mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
Auto-update from upstream
This commit is contained in:
commit
5b2db367a2
37 changed files with 703 additions and 1246 deletions
|
|
@ -807,14 +807,6 @@ config BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA
|
|||
depends on SOC_AU1200 && BLK_DEV_IDE_AU1XXX
|
||||
endchoice
|
||||
|
||||
config BLK_DEV_IDE_AU1XXX_BURSTABLE_ON
|
||||
bool "Enable burstable Mode on DbDMA"
|
||||
default false
|
||||
depends BLK_DEV_IDE_AU1XXX
|
||||
help
|
||||
This option enable the burstable Flag on DbDMA controller
|
||||
(cf. "AMD Alchemy 'Au1200' Processor Data Book - PRELIMINARY").
|
||||
|
||||
config BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ
|
||||
int "Maximum transfer size (KB) per request (up to 128)"
|
||||
default "128"
|
||||
|
|
@ -940,7 +932,7 @@ config BLK_DEV_Q40IDE
|
|||
|
||||
config BLK_DEV_MPC8xx_IDE
|
||||
bool "MPC8xx IDE support"
|
||||
depends on 8xx
|
||||
depends on 8xx && IDE=y && BLK_DEV_IDE=y
|
||||
help
|
||||
This option provides support for IDE on Motorola MPC8xx Systems.
|
||||
Please see 'Type of MPC8xx IDE interface' for details.
|
||||
|
|
|
|||
|
|
@ -1292,7 +1292,6 @@ static ide_startstop_t cdrom_start_seek (ide_drive_t *drive, unsigned int block)
|
|||
struct cdrom_info *info = drive->driver_data;
|
||||
|
||||
info->dma = 0;
|
||||
info->cmd = 0;
|
||||
info->start_seek = jiffies;
|
||||
return cdrom_start_packet_command(drive, 0, cdrom_start_seek_continuation);
|
||||
}
|
||||
|
|
@ -1344,8 +1343,6 @@ static ide_startstop_t cdrom_start_read (ide_drive_t *drive, unsigned int block)
|
|||
(rq->nr_sectors & (sectors_per_frame - 1)))
|
||||
info->dma = 0;
|
||||
|
||||
info->cmd = READ;
|
||||
|
||||
/* Start sending the read request to the drive. */
|
||||
return cdrom_start_packet_command(drive, 32768, cdrom_start_read_continuation);
|
||||
}
|
||||
|
|
@ -1484,7 +1481,6 @@ static ide_startstop_t cdrom_do_packet_command (ide_drive_t *drive)
|
|||
struct cdrom_info *info = drive->driver_data;
|
||||
|
||||
info->dma = 0;
|
||||
info->cmd = 0;
|
||||
rq->flags &= ~REQ_FAILED;
|
||||
len = rq->data_len;
|
||||
|
||||
|
|
@ -1891,7 +1887,6 @@ static ide_startstop_t cdrom_start_write(ide_drive_t *drive, struct request *rq)
|
|||
/* use dma, if possible. we don't need to check more, since we
|
||||
* know that the transfer is always (at least!) frame aligned */
|
||||
info->dma = drive->using_dma ? 1 : 0;
|
||||
info->cmd = WRITE;
|
||||
|
||||
info->devinfo.media_written = 1;
|
||||
|
||||
|
|
@ -1916,7 +1911,6 @@ static ide_startstop_t cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
|
|||
rq->flags |= REQ_QUIET;
|
||||
|
||||
info->dma = 0;
|
||||
info->cmd = 0;
|
||||
|
||||
/*
|
||||
* sg request
|
||||
|
|
@ -1925,7 +1919,6 @@ static ide_startstop_t cdrom_do_block_pc(ide_drive_t *drive, struct request *rq)
|
|||
int mask = drive->queue->dma_alignment;
|
||||
unsigned long addr = (unsigned long) page_address(bio_page(rq->bio));
|
||||
|
||||
info->cmd = rq_data_dir(rq);
|
||||
info->dma = drive->using_dma;
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -480,7 +480,6 @@ struct cdrom_info {
|
|||
|
||||
struct request request_sense_request;
|
||||
int dma;
|
||||
int cmd;
|
||||
unsigned long last_block;
|
||||
unsigned long start_seek;
|
||||
/* Buffer to hold mechanism status and changer slot table. */
|
||||
|
|
|
|||
|
|
@ -1034,12 +1034,12 @@ static int ide_disk_remove(struct device *dev)
|
|||
struct ide_disk_obj *idkp = drive->driver_data;
|
||||
struct gendisk *g = idkp->disk;
|
||||
|
||||
ide_cacheflush_p(drive);
|
||||
|
||||
ide_unregister_subdriver(drive, idkp->driver);
|
||||
|
||||
del_gendisk(g);
|
||||
|
||||
ide_cacheflush_p(drive);
|
||||
|
||||
ide_disk_put(idkp);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -90,11 +90,6 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/irq.h>
|
||||
|
||||
struct drive_list_entry {
|
||||
const char *id_model;
|
||||
const char *id_firmware;
|
||||
};
|
||||
|
||||
static const struct drive_list_entry drive_whitelist [] = {
|
||||
|
||||
{ "Micropolis 2112A" , "ALL" },
|
||||
|
|
@ -139,7 +134,7 @@ static const struct drive_list_entry drive_blacklist [] = {
|
|||
};
|
||||
|
||||
/**
|
||||
* in_drive_list - look for drive in black/white list
|
||||
* ide_in_drive_list - look for drive in black/white list
|
||||
* @id: drive identifier
|
||||
* @drive_table: list to inspect
|
||||
*
|
||||
|
|
@ -147,7 +142,7 @@ static const struct drive_list_entry drive_blacklist [] = {
|
|||
* Returns 1 if the drive is found in the table.
|
||||
*/
|
||||
|
||||
static int in_drive_list(struct hd_driveid *id, const struct drive_list_entry *drive_table)
|
||||
int ide_in_drive_list(struct hd_driveid *id, const struct drive_list_entry *drive_table)
|
||||
{
|
||||
for ( ; drive_table->id_model ; drive_table++)
|
||||
if ((!strcmp(drive_table->id_model, id->model)) &&
|
||||
|
|
@ -157,6 +152,8 @@ static int in_drive_list(struct hd_driveid *id, const struct drive_list_entry *d
|
|||
return 0;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(ide_in_drive_list);
|
||||
|
||||
/**
|
||||
* ide_dma_intr - IDE DMA interrupt handler
|
||||
* @drive: the drive the interrupt is for
|
||||
|
|
@ -663,7 +660,7 @@ int __ide_dma_bad_drive (ide_drive_t *drive)
|
|||
{
|
||||
struct hd_driveid *id = drive->id;
|
||||
|
||||
int blacklist = in_drive_list(id, drive_blacklist);
|
||||
int blacklist = ide_in_drive_list(id, drive_blacklist);
|
||||
if (blacklist) {
|
||||
printk(KERN_WARNING "%s: Disabling (U)DMA for %s (blacklisted)\n",
|
||||
drive->name, id->model);
|
||||
|
|
@ -677,7 +674,7 @@ EXPORT_SYMBOL(__ide_dma_bad_drive);
|
|||
int __ide_dma_good_drive (ide_drive_t *drive)
|
||||
{
|
||||
struct hd_driveid *id = drive->id;
|
||||
return in_drive_list(id, drive_whitelist);
|
||||
return ide_in_drive_list(id, drive_whitelist);
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL(__ide_dma_good_drive);
|
||||
|
|
|
|||
|
|
@ -1 +1,4 @@
|
|||
obj-$(CONFIG_BLK_DEV_IDE_SWARM) += swarm.o
|
||||
obj-$(CONFIG_BLK_DEV_IDE_AU1XXX) += au1xxx-ide.o
|
||||
|
||||
EXTRA_CFLAGS := -Idrivers/ide
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -622,12 +622,18 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev, ide_pci_device_t * d)
|
|||
ide_hwif_t *hwif;
|
||||
int h;
|
||||
|
||||
/*
|
||||
* Find an empty HWIF; if none available, return -ENOMEM.
|
||||
*/
|
||||
for (h = 0; h < MAX_HWIFS; ++h) {
|
||||
hwif = &ide_hwifs[h];
|
||||
/* Find an empty HWIF */
|
||||
if (hwif->chipset == ide_unknown)
|
||||
break;
|
||||
}
|
||||
if (h == MAX_HWIFS) {
|
||||
printk(KERN_ERR "%s: too many IDE interfaces, no room in table\n", d->name);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
/* Get the CmdBlk and CtrlBlk Base Registers */
|
||||
base = pci_resource_start(dev, 0) + IOC4_CMD_OFFSET;
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ static struct via_isa_bridge {
|
|||
u16 flags;
|
||||
} via_isa_bridges[] = {
|
||||
{ "vt6410", PCI_DEVICE_ID_VIA_6410, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8251", PCI_DEVICE_ID_VIA_8251, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8237", PCI_DEVICE_ID_VIA_8237, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8235", PCI_DEVICE_ID_VIA_8235, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
{ "vt8233a", PCI_DEVICE_ID_VIA_8233A, 0x00, 0x2f, VIA_UDMA_133 | VIA_BAD_AST },
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ static struct alps_model_info alps_model_data[] = {
|
|||
{ { 0x53, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
|
||||
{ { 0x63, 0x02, 0x0a }, 0xf8, 0xf8, 0 },
|
||||
{ { 0x63, 0x02, 0x14 }, 0xf8, 0xf8, 0 },
|
||||
{ { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, 0 },
|
||||
{ { 0x63, 0x02, 0x28 }, 0xf8, 0xf8, ALPS_FW_BK_2 }, /* Fujitsu Siemens S6010 */
|
||||
{ { 0x63, 0x02, 0x3c }, 0x8f, 0x8f, ALPS_WHEEL }, /* Toshiba Satellite S2400-103 */
|
||||
{ { 0x63, 0x02, 0x50 }, 0xef, 0xef, ALPS_FW_BK_1 }, /* NEC Versa L320 */
|
||||
{ { 0x63, 0x02, 0x64 }, 0xf8, 0xf8, 0 },
|
||||
|
|
|
|||
|
|
@ -679,7 +679,15 @@ static void mmc_idle_cards(struct mmc_host *host)
|
|||
}
|
||||
|
||||
/*
|
||||
* Apply power to the MMC stack.
|
||||
* Apply power to the MMC stack. This is a two-stage process.
|
||||
* First, we enable power to the card without the clock running.
|
||||
* We then wait a bit for the power to stabilise. Finally,
|
||||
* enable the bus drivers and clock to the card.
|
||||
*
|
||||
* We must _NOT_ enable the clock prior to power stablising.
|
||||
*
|
||||
* If a host does all the power sequencing itself, ignore the
|
||||
* initial MMC_POWER_UP stage.
|
||||
*/
|
||||
static void mmc_power_up(struct mmc_host *host)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
|
|||
void ibmvscsi_release_crq_queue(struct crq_queue *queue,
|
||||
struct ibmvscsi_host_data *hostdata,
|
||||
int max_requests);
|
||||
void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
|
||||
int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
|
||||
struct ibmvscsi_host_data *hostdata);
|
||||
|
||||
void ibmvscsi_handle_crq(struct viosrp_crq *crq,
|
||||
|
|
|
|||
|
|
@ -117,9 +117,10 @@ void ibmvscsi_release_crq_queue(struct crq_queue *queue,
|
|||
*
|
||||
* no-op for iSeries
|
||||
*/
|
||||
void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
|
||||
int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
|
||||
struct ibmvscsi_host_data *hostdata)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -230,6 +230,11 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
|
|||
rc = plpar_hcall_norets(H_REG_CRQ,
|
||||
vdev->unit_address,
|
||||
queue->msg_token, PAGE_SIZE);
|
||||
if (rc == H_Resource)
|
||||
/* maybe kexecing and resource is busy. try a reset */
|
||||
rc = ibmvscsi_reset_crq_queue(queue,
|
||||
hostdata);
|
||||
|
||||
if (rc == 2) {
|
||||
/* Adapter is good, but other end is not ready */
|
||||
printk(KERN_WARNING "ibmvscsi: Partner adapter not ready\n");
|
||||
|
|
@ -281,7 +286,7 @@ int ibmvscsi_init_crq_queue(struct crq_queue *queue,
|
|||
* @hostdata: ibmvscsi_host_data of host
|
||||
*
|
||||
*/
|
||||
void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
|
||||
int ibmvscsi_reset_crq_queue(struct crq_queue *queue,
|
||||
struct ibmvscsi_host_data *hostdata)
|
||||
{
|
||||
int rc;
|
||||
|
|
@ -309,4 +314,5 @@ void ibmvscsi_reset_crq_queue(struct crq_queue *queue,
|
|||
printk(KERN_WARNING
|
||||
"ibmvscsi: couldn't register crq--rc 0x%x\n", rc);
|
||||
}
|
||||
return rc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -664,7 +664,7 @@ mega_build_cmd(adapter_t *adapter, Scsi_Cmnd *cmd, int *busy)
|
|||
sg->offset;
|
||||
} else
|
||||
buf = cmd->request_buffer;
|
||||
memset(cmd->request_buffer, 0, cmd->cmnd[4]);
|
||||
memset(buf, 0, cmd->cmnd[4]);
|
||||
if (cmd->use_sg) {
|
||||
struct scatterlist *sg;
|
||||
|
||||
|
|
|
|||
|
|
@ -2476,17 +2476,9 @@ typedef struct scsi_qla_host {
|
|||
*/
|
||||
#define LOOP_TRANSITION(ha) \
|
||||
(test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \
|
||||
test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags))
|
||||
|
||||
#define LOOP_NOT_READY(ha) \
|
||||
((test_bit(ISP_ABORT_NEEDED, &ha->dpc_flags) || \
|
||||
test_bit(ABORT_ISP_ACTIVE, &ha->dpc_flags) || \
|
||||
test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
|
||||
test_bit(LOOP_RESYNC_ACTIVE, &ha->dpc_flags)) || \
|
||||
test_bit(LOOP_RESYNC_NEEDED, &ha->dpc_flags) || \
|
||||
atomic_read(&ha->loop_state) == LOOP_DOWN)
|
||||
|
||||
#define LOOP_RDY(ha) (!LOOP_NOT_READY(ha))
|
||||
|
||||
#define TGT_Q(ha, t) (ha->otgt[t])
|
||||
|
||||
#define to_qla_host(x) ((scsi_qla_host_t *) (x)->hostdata)
|
||||
|
|
|
|||
|
|
@ -1259,7 +1259,7 @@ qla2x00_configure_hba(scsi_qla_host_t *ha)
|
|||
rval = qla2x00_get_adapter_id(ha,
|
||||
&loop_id, &al_pa, &area, &domain, &topo);
|
||||
if (rval != QLA_SUCCESS) {
|
||||
if (LOOP_NOT_READY(ha) || atomic_read(&ha->loop_down_timer) ||
|
||||
if (LOOP_TRANSITION(ha) || atomic_read(&ha->loop_down_timer) ||
|
||||
(rval == QLA_COMMAND_ERROR && loop_id == 0x7)) {
|
||||
DEBUG2(printk("%s(%ld) Loop is in a transition state\n",
|
||||
__func__, ha->host_no));
|
||||
|
|
@ -1796,7 +1796,7 @@ qla2x00_configure_loop(scsi_qla_host_t *ha)
|
|||
}
|
||||
|
||||
if (rval == QLA_SUCCESS && test_bit(RSCN_UPDATE, &flags)) {
|
||||
if (LOOP_NOT_READY(ha)) {
|
||||
if (LOOP_TRANSITION(ha)) {
|
||||
rval = QLA_FUNCTION_FAILED;
|
||||
} else {
|
||||
rval = qla2x00_configure_fabric(ha);
|
||||
|
|
@ -2369,7 +2369,7 @@ qla2x00_find_all_fabric_devs(scsi_qla_host_t *ha, struct list_head *new_fcports)
|
|||
if (qla2x00_is_reserved_id(ha, loop_id))
|
||||
continue;
|
||||
|
||||
if (atomic_read(&ha->loop_down_timer) || LOOP_NOT_READY(ha))
|
||||
if (atomic_read(&ha->loop_down_timer) || LOOP_TRANSITION(ha))
|
||||
break;
|
||||
|
||||
if (swl != NULL) {
|
||||
|
|
|
|||
|
|
@ -909,6 +909,21 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt)
|
|||
resid = resid_len;
|
||||
cp->resid = resid;
|
||||
CMD_RESID_LEN(cp) = resid;
|
||||
|
||||
if (!lscsi_status &&
|
||||
((unsigned)(cp->request_bufflen - resid) <
|
||||
cp->underflow)) {
|
||||
qla_printk(KERN_INFO, ha,
|
||||
"scsi(%ld:%d:%d:%d): Mid-layer underflow "
|
||||
"detected (%x of %x bytes)...returning "
|
||||
"error status.\n", ha->host_no,
|
||||
cp->device->channel, cp->device->id,
|
||||
cp->device->lun, resid,
|
||||
cp->request_bufflen);
|
||||
|
||||
cp->result = DID_ERROR << 16;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cp->result = DID_OK << 16 | lscsi_status;
|
||||
|
||||
|
|
|
|||
|
|
@ -422,10 +422,15 @@ static int scsi_eh_completed_normally(struct scsi_cmnd *scmd)
|
|||
**/
|
||||
static void scsi_eh_done(struct scsi_cmnd *scmd)
|
||||
{
|
||||
struct completion *eh_action;
|
||||
|
||||
SCSI_LOG_ERROR_RECOVERY(3,
|
||||
printk("%s scmd: %p result: %x\n",
|
||||
__FUNCTION__, scmd, scmd->result));
|
||||
complete(scmd->device->host->eh_action);
|
||||
|
||||
eh_action = scmd->device->host->eh_action;
|
||||
if (eh_action)
|
||||
complete(eh_action);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1085,6 +1085,26 @@ static void scsi_generic_done(struct scsi_cmnd *cmd)
|
|||
scsi_io_completion(cmd, cmd->result == 0 ? cmd->bufflen : 0, 0);
|
||||
}
|
||||
|
||||
void scsi_setup_blk_pc_cmnd(struct scsi_cmnd *cmd, int retries)
|
||||
{
|
||||
struct request *req = cmd->request;
|
||||
|
||||
BUG_ON(sizeof(req->cmd) > sizeof(cmd->cmnd));
|
||||
memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd));
|
||||
cmd->cmd_len = req->cmd_len;
|
||||
if (!req->data_len)
|
||||
cmd->sc_data_direction = DMA_NONE;
|
||||
else if (rq_data_dir(req) == WRITE)
|
||||
cmd->sc_data_direction = DMA_TO_DEVICE;
|
||||
else
|
||||
cmd->sc_data_direction = DMA_FROM_DEVICE;
|
||||
|
||||
cmd->transfersize = req->data_len;
|
||||
cmd->allowed = retries;
|
||||
cmd->timeout_per_command = req->timeout;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(scsi_setup_blk_pc_cmnd);
|
||||
|
||||
static int scsi_prep_fn(struct request_queue *q, struct request *req)
|
||||
{
|
||||
struct scsi_device *sdev = q->queuedata;
|
||||
|
|
@ -1220,18 +1240,7 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req)
|
|||
goto kill;
|
||||
}
|
||||
} else {
|
||||
memcpy(cmd->cmnd, req->cmd, sizeof(cmd->cmnd));
|
||||
cmd->cmd_len = req->cmd_len;
|
||||
if (rq_data_dir(req) == WRITE)
|
||||
cmd->sc_data_direction = DMA_TO_DEVICE;
|
||||
else if (req->data_len)
|
||||
cmd->sc_data_direction = DMA_FROM_DEVICE;
|
||||
else
|
||||
cmd->sc_data_direction = DMA_NONE;
|
||||
|
||||
cmd->transfersize = req->data_len;
|
||||
cmd->allowed = 3;
|
||||
cmd->timeout_per_command = req->timeout;
|
||||
scsi_setup_blk_pc_cmnd(cmd, 3);
|
||||
cmd->done = scsi_generic_done;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -245,24 +245,10 @@ static int sd_init_command(struct scsi_cmnd * SCpnt)
|
|||
* SG_IO from block layer already setup, just copy cdb basically
|
||||
*/
|
||||
if (blk_pc_request(rq)) {
|
||||
if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd))
|
||||
return 0;
|
||||
|
||||
memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
|
||||
SCpnt->cmd_len = rq->cmd_len;
|
||||
if (rq_data_dir(rq) == WRITE)
|
||||
SCpnt->sc_data_direction = DMA_TO_DEVICE;
|
||||
else if (rq->data_len)
|
||||
SCpnt->sc_data_direction = DMA_FROM_DEVICE;
|
||||
else
|
||||
SCpnt->sc_data_direction = DMA_NONE;
|
||||
|
||||
this_count = rq->data_len;
|
||||
scsi_setup_blk_pc_cmnd(SCpnt, SD_PASSTHROUGH_RETRIES);
|
||||
if (rq->timeout)
|
||||
timeout = rq->timeout;
|
||||
|
||||
SCpnt->transfersize = rq->data_len;
|
||||
SCpnt->allowed = SD_PASSTHROUGH_RETRIES;
|
||||
goto queue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -320,25 +320,11 @@ static int sr_init_command(struct scsi_cmnd * SCpnt)
|
|||
* these are already setup, just copy cdb basically
|
||||
*/
|
||||
if (SCpnt->request->flags & REQ_BLOCK_PC) {
|
||||
struct request *rq = SCpnt->request;
|
||||
scsi_setup_blk_pc_cmnd(SCpnt, MAX_RETRIES);
|
||||
|
||||
if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd))
|
||||
return 0;
|
||||
if (SCpnt->timeout_per_command)
|
||||
timeout = SCpnt->timeout_per_command;
|
||||
|
||||
memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
|
||||
SCpnt->cmd_len = rq->cmd_len;
|
||||
if (!rq->data_len)
|
||||
SCpnt->sc_data_direction = DMA_NONE;
|
||||
else if (rq_data_dir(rq) == WRITE)
|
||||
SCpnt->sc_data_direction = DMA_TO_DEVICE;
|
||||
else
|
||||
SCpnt->sc_data_direction = DMA_FROM_DEVICE;
|
||||
|
||||
this_count = rq->data_len;
|
||||
if (rq->timeout)
|
||||
timeout = rq->timeout;
|
||||
|
||||
SCpnt->transfersize = rq->data_len;
|
||||
goto queue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4194,27 +4194,10 @@ static void st_intr(struct scsi_cmnd *SCpnt)
|
|||
*/
|
||||
static int st_init_command(struct scsi_cmnd *SCpnt)
|
||||
{
|
||||
struct request *rq;
|
||||
|
||||
if (!(SCpnt->request->flags & REQ_BLOCK_PC))
|
||||
return 0;
|
||||
|
||||
rq = SCpnt->request;
|
||||
if (sizeof(rq->cmd) > sizeof(SCpnt->cmnd))
|
||||
return 0;
|
||||
|
||||
memcpy(SCpnt->cmnd, rq->cmd, sizeof(SCpnt->cmnd));
|
||||
SCpnt->cmd_len = rq->cmd_len;
|
||||
|
||||
if (rq_data_dir(rq) == WRITE)
|
||||
SCpnt->sc_data_direction = DMA_TO_DEVICE;
|
||||
else if (rq->data_len)
|
||||
SCpnt->sc_data_direction = DMA_FROM_DEVICE;
|
||||
else
|
||||
SCpnt->sc_data_direction = DMA_NONE;
|
||||
|
||||
SCpnt->timeout_per_command = rq->timeout;
|
||||
SCpnt->transfersize = rq->data_len;
|
||||
scsi_setup_blk_pc_cmnd(SCpnt, 0);
|
||||
SCpnt->done = st_intr;
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1405,7 +1405,6 @@ static void sym_check_goals(struct sym_hcb *np, struct scsi_target *starget,
|
|||
goal->iu = 0;
|
||||
goal->dt = 0;
|
||||
goal->qas = 0;
|
||||
goal->period = 0;
|
||||
goal->offset = 0;
|
||||
return;
|
||||
}
|
||||
|
|
@ -1465,7 +1464,8 @@ static int sym_prepare_nego(struct sym_hcb *np, struct sym_ccb *cp, u_char *msgp
|
|||
* Many devices implement PPR in a buggy way, so only use it if we
|
||||
* really want to.
|
||||
*/
|
||||
if (goal->iu || goal->dt || goal->qas || (goal->period < 0xa)) {
|
||||
if (goal->offset &&
|
||||
(goal->iu || goal->dt || goal->qas || (goal->period < 0xa))) {
|
||||
nego = NS_PPR;
|
||||
} else if (spi_width(starget) != goal->width) {
|
||||
nego = NS_WIDE;
|
||||
|
|
|
|||
Loading…
Reference in a new issue