Mercurial > illumos > illumos-gate
changeset 13731:35bcb68f2175
2042 blkdev should not discard bd->d_maxxfer
Reviewed by: Robert Mustacchi <rm@joyent.com>
Reviewed by: Garrett D'Amore <garrett@damore.org>
Approved by: Dan McDonald <danmcd@nexenta.com>
author | Alexey Zaytsev <alexey.zaytsev@nexenta.com> |
---|---|
date | Mon, 18 Jun 2012 21:47:58 -0400 |
parents | bd805c3b8675 |
children | 41e535b56aae |
files | usr/src/uts/common/io/blkdev/blkdev.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/usr/src/uts/common/io/blkdev/blkdev.c Mon Jun 18 21:47:56 2012 -0400 +++ b/usr/src/uts/common/io/blkdev/blkdev.c Mon Jun 18 21:47:58 2012 -0400 @@ -396,10 +396,13 @@ bzero(&drive, sizeof (drive)); bd->d_ops.o_drive_info(bd->d_private, &drive); bd->d_qsize = drive.d_qsize; - bd->d_maxxfer = drive.d_maxxfer; bd->d_removable = drive.d_removable; bd->d_hotpluggable = drive.d_hotpluggable; + if (drive.d_maxxfer && drive.d_maxxfer < bd->d_maxxfer) + bd->d_maxxfer = drive.d_maxxfer; + + rv = cmlb_attach(dip, &bd_tg_ops, DTYPE_DIRECT, bd->d_removable, bd->d_hotpluggable, drive.d_lun >= 0 ? DDI_NT_BLOCK_CHAN : DDI_NT_BLOCK,