Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-13 Thread Dave Jones
On Sun, May 13, 2007 at 07:50:16PM +0200, Tejun Heo wrote: > > Otherwise, as Jeff mentions, you're doing a redundant assignment > > in the else branch. > > Hmmm... I'm feeling very dense today. At that point, class is either > ATA_DEV_ATA or ATA_DEV_ATAPI. The if-else clause tries to flip b

Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-13 Thread Tejun Heo
Dave Jones wrote: > On Sun, May 13, 2007 at 02:57:44PM +0200, Tejun Heo wrote: > > Jeff Garzik wrote: > > > Tejun Heo wrote: > > >> +if (class == ATA_DEV_ATA) > > >> +class = ATA_DEV_ATAPI; > > >> +else > > >> +class = ATA_DEV_ATA; > >

Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-13 Thread Dave Jones
On Sun, May 13, 2007 at 02:57:44PM +0200, Tejun Heo wrote: > Jeff Garzik wrote: > > Tejun Heo wrote: > >> +if (class == ATA_DEV_ATA) > >> +class = ATA_DEV_ATAPI; > >> +else > >> +class = ATA_DEV_ATA; > > > > > > the 'else' branch is

Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-13 Thread Tejun Heo
Jeff Garzik wrote: > Tejun Heo wrote: >> +if (class == ATA_DEV_ATA) >> +class = ATA_DEV_ATAPI; >> +else >> +class = ATA_DEV_ATA; > > > the 'else' branch is obviously redundant Why? We can also fallback from ATAPI to ATA. -- tejun - To un

Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-11 Thread Jeff Garzik
Tejun Heo wrote: + if (class == ATA_DEV_ATA) + class = ATA_DEV_ATAPI; + else + class = ATA_DEV_ATA; the 'else' branch is obviously redundant - To unsubscribe from this list: send the line "

Re: [PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-11 Thread Jeff Garzik
Tejun Heo wrote: It seems the world isn't as frank as we thought and some devices lie about who they are. Fallback to the other IDENTIFY if IDENTIFY is aborted by the device. As this is the strategy used by IDE for a long time, it shouldn't cause too much problem. Signed-off-by: Tejun Heo <[EM

[PATCH] libata: fallback to the other IDENTIFY on device error, take#2

2007-05-11 Thread Tejun Heo
It seems the world isn't as frank as we thought and some devices lie about who they are. Fallback to the other IDENTIFY if IDENTIFY is aborted by the device. As this is the strategy used by IDE for a long time, it shouldn't cause too much problem. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc:

Re: [PATCH] libata: fallback to the other IDENTIFY on device error

2007-05-09 Thread Jeff Garzik
Tejun Heo wrote: It seems the world isn't as frank as we thought and some devices lie about who they are. Fallback to the other IDENTIFY if IDENTIFY fails with device error. As this is the strategy used by IDE for a long time, it shouldn't cause too much problem. Signed-off-by: Tejun Heo <[EMA

Re: [PATCH] libata: fallback to the other IDENTIFY on device error

2007-05-08 Thread Tejun Heo
William Thompson wrote: > On Mon, May 07, 2007 at 06:42:26PM +0200, Tejun Heo wrote: >> It seems the world isn't as frank as we thought and some devices lie >> about who they are. Fallback to the other IDENTIFY if IDENTIFY fails >> with device error. As this is the strategy used by IDE for a long

Re: [PATCH] libata: fallback to the other IDENTIFY on device error

2007-05-07 Thread William Thompson
On Mon, May 07, 2007 at 06:42:26PM +0200, Tejun Heo wrote: > It seems the world isn't as frank as we thought and some devices lie > about who they are. Fallback to the other IDENTIFY if IDENTIFY fails > with device error. As this is the strategy used by IDE for a long > time, it shouldn't cause t

Re: [PATCH] libata: fallback to the other IDENTIFY on device error

2007-05-07 Thread William Thompson
On Mon, May 07, 2007 at 06:42:26PM +0200, Tejun Heo wrote: > It seems the world isn't as frank as we thought and some devices lie > about who they are. Fallback to the other IDENTIFY if IDENTIFY fails > with device error. As this is the strategy used by IDE for a long > time, it shouldn't cause t

[PATCH] libata: fallback to the other IDENTIFY on device error

2007-05-07 Thread Tejun Heo
It seems the world isn't as frank as we thought and some devices lie about who they are. Fallback to the other IDENTIFY if IDENTIFY fails with device error. As this is the strategy used by IDE for a long time, it shouldn't cause too much problem. Signed-off-by: Tejun Heo <[EMAIL PROTECTED]> Cc: