diff options
Diffstat (limited to 'drivers/scsi')
| -rw-r--r-- | drivers/scsi/sandbox_scsi.c | 2 | ||||
| -rw-r--r-- | drivers/scsi/scsi.c | 24 | ||||
| -rw-r--r-- | drivers/scsi/scsi_bootdev.c | 4 |
3 files changed, 2 insertions, 28 deletions
diff --git a/drivers/scsi/sandbox_scsi.c b/drivers/scsi/sandbox_scsi.c index 544a0247083..5f0b01d86d5 100644 --- a/drivers/scsi/sandbox_scsi.c +++ b/drivers/scsi/sandbox_scsi.c @@ -128,7 +128,7 @@ static int sandbox_scsi_remove(struct udevice *dev) return 0; } -struct scsi_ops sandbox_scsi_ops = { +static const struct scsi_ops sandbox_scsi_ops = { .exec = sandbox_scsi_exec, .bus_reset = sandbox_scsi_bus_reset, }; diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 116b696b08d..50e7d749921 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -82,23 +82,6 @@ static void scsi_setup_inquiry(struct scsi_cmd *pccb) pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */ } -static void scsi_setup_sync_cache(struct scsi_cmd *pccb, lbaint_t start, - lbaint_t blocks) -{ - pccb->cmd[0] = SCSI_SYNC_CACHE; - pccb->cmd[1] = 0; - pccb->cmd[2] = (unsigned char)(start >> 24) & 0xff; - pccb->cmd[3] = (unsigned char)(start >> 16) & 0xff; - pccb->cmd[4] = (unsigned char)(start >> 8) & 0xff; - pccb->cmd[5] = (unsigned char)start & 0xff; - pccb->cmd[6] = 0; - pccb->cmd[7] = (unsigned char)(blocks >> 8) & 0xff; - pccb->cmd[8] = (unsigned char)blocks & 0xff; - pccb->cmd[9] = 0; - pccb->cmdlen = 10; - pccb->msgout[0] = SCSI_IDENTIFY; /* NOT USED */ -} - static void scsi_setup_read_ext(struct scsi_cmd *pccb, lbaint_t start, lbaint_t blocks) { @@ -124,7 +107,7 @@ static void scsi_setup_write_ext(struct scsi_cmd *pccb, lbaint_t start, lbaint_t blocks) { pccb->cmd[0] = SCSI_WRITE10; - pccb->cmd[1] = 0; + pccb->cmd[1] = 0x08; /* Set FUA bit to bypass write cache */ pccb->cmd[2] = (unsigned char)(start >> 24) & 0xff; pccb->cmd[3] = (unsigned char)(start >> 16) & 0xff; pccb->cmd[4] = (unsigned char)(start >> 8) & 0xff; @@ -301,11 +284,6 @@ static ulong scsi_write(struct udevice *dev, lbaint_t blknr, lbaint_t blkcnt, buf_addr += pccb->datalen; } while (blks != 0); - /* Flush the SCSI cache so we don't lose data on board reset. */ - scsi_setup_sync_cache(pccb, 0, 0); - if (scsi_exec(bdev, pccb)) - scsi_print_error(pccb); - debug("%s: end startblk " LBAF ", blccnt " LBAF " buffer %lX\n", __func__, start, blocks, buf_addr); return blkcnt; diff --git a/drivers/scsi/scsi_bootdev.c b/drivers/scsi/scsi_bootdev.c index 28e4612f337..541b021b732 100644 --- a/drivers/scsi/scsi_bootdev.c +++ b/drivers/scsi/scsi_bootdev.c @@ -37,9 +37,6 @@ static int scsi_bootdev_hunt(struct bootdev_hunter *info, bool show) return 0; } -struct bootdev_ops scsi_bootdev_ops = { -}; - static const struct udevice_id scsi_bootdev_ids[] = { { .compatible = "u-boot,bootdev-scsi" }, { } @@ -48,7 +45,6 @@ static const struct udevice_id scsi_bootdev_ids[] = { U_BOOT_DRIVER(scsi_bootdev) = { .name = "scsi_bootdev", .id = UCLASS_BOOTDEV, - .ops = &scsi_bootdev_ops, .bind = scsi_bootdev_bind, .of_match = scsi_bootdev_ids, }; |
