diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 5693f6d7eddb8b20cd9b3e0374a4e73e60ab7aa2..ab96b793f9041d0828b5ce2c0de1d452d64f4f93 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -2639,13 +2639,16 @@ static void sd_read_write_same(struct scsi_disk *sdkp, unsigned char *buffer) struct scsi_device *sdev = sdkp->device; if (scsi_report_opcode(sdev, buffer, SD_BUF_SIZE, INQUIRY) < 0) { + /* too large values might cause issues with arcmsr */ + int vpd_buf_len = 64; + sdev->no_report_opcodes = 1; /* Disable WRITE SAME if REPORT SUPPORTED OPERATION * CODES is unsupported and the device has an ATA * Information VPD page (SAT). */ - if (!scsi_get_vpd_page(sdev, 0x89, buffer, SD_BUF_SIZE)) + if (!scsi_get_vpd_page(sdev, 0x89, buffer, vpd_buf_len)) sdev->no_write_same = 1; }