Re: [PATCH] libata ATA vs SATA detection and workaround.
From: Jeff Garzik
Date: Mon Aug 30 2004 - 11:39:05 EST
Brad Campbell wrote:
I'm still pondering what Alan was hinting at, a bit. You (Brad) are
correct in pointing out that this code should only trigger for the
correct situations (lba48, etc.) which are only present on modern
drives, but... there is still a chance that word 93 will be zero on
some weird (probably non-compliant) device.
I agree completely, though my feeling is that if someone plugs a device
that broken into a SATA controller via a bridge then there "aint nuffin
we can do about it" anyway and if it breaks it breaks. I guess we could
offer the option you suggested before where we load the individual
drivers as modules and provide a "knobble" module parm that will limit
max_sectors to 200 and udma_mask to udma/100.
Then we get the hassle if someone wants to use it as the root device,
but I guess then you move to an initrd and load the module from there.
How far do we want to take it?
For now I think moving your code to ata_dev_config() function is
sufficient, with one modification:
Move the
((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(ap->device)))
test into a separate function all its own, "ata_knobble_device" or
somesuch. static inline if you wish.
Then it will be trivial to add a 'knobble' module parm later on, by
simply modifying ata_knobble_device() to also check the module parameter
in addition to the existing tests.
Jeff
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/