Messages in this thread | | | Date | Sun, 3 Aug 2003 11:52:52 +0200 | From | Jens Axboe <> | Subject | Re: [PATCH] ide-disk.c rev 1.13 killed CONFIG_IDEDISK_STROKE |
| |
On Sat, Aug 02 2003, Erik Andersen wrote: > On Sat Aug 02, 2003 at 10:06:19PM +0100, Alan Cox wrote: > > On Sad, 2003-08-02 at 18:42, Andries Brouwer wrote: > > > OK, so we have to investigate. This strange test was inserted > > > in 2.4 and 2.5 via Alan, and google gives me Alan's changelog: > > > > > > Linux 2.5.66-ac1 > > > o Don't issue WIN_SET_MAX on older drivers (Jens Axboe) > > > (Breaks some Samsung) > > > > Some older Samsung drives don't abort WIN_SET_MAX but the firmware > > hangs hence the check. > > Ok, I think I can actually test that one. > > <rummages in ye olde box of hardware> > > Cool, found it, I have an ancient Samsung SHD-3212A (426MB) > drive that will hopefully show the problem. > > <sound of testing in the distance> > > Ok, found the problem. The current code (in addition to being > badly written) does not even bother to test if the drive supports > the HPA feature set before issuing a WIN_SET_MAX call. In my > case, it didn't crash my Samsung drive, but it certainly did make > it complain rather loudly. > > I have rewritten the init_idedisk_capacity() function and taught > it to behave itself. It is now much cleaner IMHO, and will only > issues SET_MAX* calls to drives that claim they support such > things. I've tested this patch with a 200GB drive, a 120GB > drive, an 80GB drive and my ancient Samsung drive and in each > case (48bit LBA, 28bit LBA, 28bit CHS w/o support for HPA), my > new version appears to the Right Thing(tm). > > Attached is a patch vs 2.4.22-pre10, and a patch vs 2.6.0-pre2. > Please apply,
Very nice Erik, looks good!
-- Jens Axboe
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |