diff options
author | julian <julian@FreeBSD.org> | 1995-10-12 02:02:03 +0000 |
---|---|---|
committer | julian <julian@FreeBSD.org> | 1995-10-12 02:02:03 +0000 |
commit | 8481e93a3a803f40e280c5db504eab5bdf774c64 (patch) | |
tree | 44daeb2ea32052b14579455742896990e43b178f /sys/scsi/sd.c | |
parent | d2a3a19deaa5549ce0129d0696258eb206c36dd9 (diff) | |
download | FreeBSD-src-8481e93a3a803f40e280c5db504eab5bdf774c64.zip FreeBSD-src-8481e93a3a803f40e280c5db504eab5bdf774c64.tar.gz |
Ack!
sometime around 1.51, the check for minphys dissappeared out of
transfers for disks..
we weren't hecking that the adapter could handle a transfer of
the size we were requesting..
Peter!?
:)
this explains the rash of failures I've seen reported recently
with "too many DMA segments" on raw devices
(added one for st as well)
Diffstat (limited to 'sys/scsi/sd.c')
-rw-r--r-- | sys/scsi/sd.c | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c index 71333cc..14438c9 100644 --- a/sys/scsi/sd.c +++ b/sys/scsi/sd.c @@ -14,7 +14,7 @@ * * Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992 * - * $Id: sd.c,v 1.65 1995/05/30 08:13:51 rgrimes Exp $ + * $Id: sd.c,v 1.66 1995/08/07 11:56:31 davidg Exp $ */ #define SPLSD splbio @@ -93,18 +93,18 @@ SCSI_DEVICE_ENTRIES(sd) struct scsi_device sd_switch = { - sd_sense_handler, - sdstart, /* have a queue, served by this */ - NULL, /* have no async handler */ - NULL, /* Use default 'done' routine */ - "sd", - 0, + sd_sense_handler, + sdstart, /* have a queue, served by this */ + NULL, /* have no async handler */ + NULL, /* Use default 'done' routine */ + "sd", + 0, {0, 0}, 0, /* Link flags */ sdattach, "Direct-Access", sdopen, - sizeof(struct scsi_data), + sizeof(struct scsi_data), T_DIRECT, sdunit, sdsetunit, @@ -374,6 +374,11 @@ sd_strategy(struct buf *bp, struct scsi_link *sc_link) } /* + * check it's not too big a transfer for our adapter + */ + scsi_minphys(bp,&sd_switch); + + /* * Odd number of bytes */ if (bp->b_bcount % DEV_BSIZE != 0) { |