1 --- a/drivers/scsi/ps3rom.c 2012-02-13 18:45:43.735156562 +0100
2 +++ b/drivers/scsi/ps3rom.c 2012-02-13 18:45:54.835348606 +0100
5 #define PS3ROM_MAX_SECTORS (BOUNCE_SIZE >> 9)
7 +#define PS3ROM_VENDOR_SPECIFIC_OPCODE 0xfd
10 struct ps3rom_private {
11 struct ps3_storage_device *dev;
16 +static int ps3rom_vendor_specific_request(struct ps3_storage_device *dev,
17 + struct scsi_cmnd *cmd)
19 + unsigned char opcode = cmd->cmnd[1];
22 + dev_dbg(&dev->sbd.core, "%s:%u: send vendor-specific command 0x%02x\n", __func__,
25 + if (cmd->sc_data_direction == DMA_TO_DEVICE)
26 + scsi_sg_copy_to_buffer(cmd, dev->bounce_buf, dev->bounce_size);
28 + res = lv1_storage_send_device_command(dev->sbd.dev_id,
30 + dev->bounce_lpar, scsi_bufflen(cmd),
31 + dev->bounce_lpar, dev->bounce_size,
33 + if (res == LV1_DENIED_BY_POLICY) {
34 + dev_dbg(&dev->sbd.core,
35 + "%s:%u: vendor-specific command 0x%02x denied by policy\n",
36 + __func__, __LINE__, opcode);
37 + return DID_ERROR << 16;
41 + dev_err(&dev->sbd.core,
42 + "%s:%u: vendor-specific command 0x%02x failed %d\n", __func__,
43 + __LINE__, opcode, res);
44 + return DID_ERROR << 16;
50 static inline unsigned int srb10_lba(const struct scsi_cmnd *cmd)
52 return cmd->cmnd[2] << 24 | cmd->cmnd[3] << 16 | cmd->cmnd[4] << 8 |
57 + case PS3ROM_VENDOR_SPECIFIC_OPCODE:
58 + res = ps3rom_vendor_specific_request(dev, cmd);
62 res = ps3rom_atapi_request(dev, cmd);