[PATCH] scsi_lib.c: avoid max_hw_segments warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

as per request by Geert Uytterhoeven: the patch below avoids a warning in
blk_queue_max_hw_segments(), caused by a SCSI host adapter using SG_NONE.
Please apply.

> > The second item concerns a warning given for each SCSI target scanned on
> > the Falcon, where sg_tablesize is set to SG_NONE (aka zero). The
> > blk_queue_max_hw_segments() call should set a minimum size of one
> > regardless of the sg_tablesize value (blk_queue_max_hw_segments() corrects
> > this and gives a warning).
> >
> > This one should go directly upstream, I think.
>
> Then please ask/tell linux-scsi and jejb.

--- drivers/scsi/scsi_lib.c.ms-maxhwseg.org	2006-12-09 16:49:29.000000000 +0100
+++ drivers/scsi/scsi_lib.c	2006-12-09 16:49:29.000000000 +0100
@@ -1559,7 +1559,7 @@

 	blk_queue_prep_rq(q, scsi_prep_fn);

-	blk_queue_max_hw_segments(q, shost->sg_tablesize);
+	blk_queue_max_hw_segments(q, (shost->sg_tablesize ? shost->sg_tablesize : 1));
 	blk_queue_max_phys_segments(q, SCSI_MAX_PHYS_SEGMENTS);
 	blk_queue_max_sectors(q, shost->max_sectors);
 	blk_queue_bounce_limit(q, scsi_calculate_bounce_limit(shost));

Signed-Off-By: <schmitz@xxxxxxxxxx>

Please CC: me on followup, as I'm not subscribed to linux-scsi.

	Michael
-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux