bio too big device
Quoted 10 lines · Jens
Quoted 3 lines · Andre Hedrick
So lets dirty list the one drive by Paul G. and be done. Can we do that?
Who cares, really? There's not much point in doing it, we're talking 248 vs 256 sectors in reality. I think it's a _bad_ idea, lets just keep it at 255 and avoid silly drive bugs there.
I think a black list would be the right thing:
linux/drivers/ide/ide-probe.c:
Quoted 9 lines
#ifdef CONFIG_BLK_DEV_PDC4030 max_sectors = 127; #else max_sectors = 255; #endif blk_queue_max_sectors(q, max_sectors);
IDE uses 127 sector requests if support for PDC4030 is compiled it, otherwise 255. It seems someone started with a blacklist, but never completed it. Does any distro enable PDC4030 support?
--
Manfred
Quoted 4 lines · Manfred Spraul
IDE uses 127 sector requests if support for PDC4030 is compiled it, otherwise 255. It seems someone started with a blacklist, but never completed it.
Does any distro enable PDC4030 support?
I'd be quite suprised. The 2.5 kernel means we can set max sectors per channel easily so that issue is solvable too. I'd just not noticed it until you pointed it out
PATCH 1/1 don't ignore chipset specific sector size (Was Re: bio too big device)
In reply to Manfred SpraulHello,
Quoted 11 lines · Manfred Spraul
linux/drivers/ide/ide-probe.c:Quoted 9 lines
#ifdef CONFIG_BLK_DEV_PDC4030 max_sectors = 127; #else max_sectors = 255; #endif blk_queue_max_sectors(q, max_sectors);
Quoted 3 lines
IDE uses 127 sector requests if support for PDC4030 is compiled it, otherwise 255. It seems someone started with a blacklist, but never completed it.
There is something wrong with this.
2.4.20-pre5-ac1 for example does:
*max_sect++ = ((hwif->rqsize) ? hwif->rqsize : 128); (hmm why 128?)
PDC4030 (127 sectors) and siimage (128 or 16) are setting own sector size, so this may be related to
http://bugzilla.kernel.org/show_bug.cgi?id=123.
Not tested patch (sorry, no hardware) agains 2.5.64-ac3 (applies to 2.5.64 too).
Signature · 28 lines
have fun,
alex
===== drivers/ide/ide-probe.c 1.33 vs edited =====
--- 1.33/drivers/ide/ide-probe.c Sat Mar 8 01:45:31 2003
+++ edited/drivers/ide/ide-probe.c Wed Mar 12 23:12:35 2003
@@ -995,18 +995,15 @@
static void ide_init_queue(ide_drive_t *drive)
{
request_queue_t *q = &drive->queue;
- int max_sectors;
+ int max_sectors = 255;
q->queuedata = HWGROUP(drive);
blk_init_queue(q, do_ide_request, &ide_lock);
drive->queue_setup = 1;
blk_queue_segment_boundary(q, 0xffff);
-#ifdef CONFIG_BLK_DEV_PDC4030
- max_sectors = 127;
-#else
- max_sectors = 255;
-#endif
+ if (HWIF(drive)->rqsize)
+ max_sectors = HWIF(drive)->rqsize;
blk_queue_max_sectors(q, max_sectors);
/* IDE DMA can do PRD_ENTRIES number of segments. */