version 1.178.6.2, 2020/04/08 14:08:12 |
version 1.178.6.3, 2020/04/13 08:04:48 |
Line 400 scsipi_get_tag(struct scsipi_xfer *xs) |
|
Line 400 scsipi_get_tag(struct scsipi_xfer *xs) |
|
#endif |
#endif |
|
|
bit -= 1; |
bit -= 1; |
periph->periph_freetags[word] &= ~(1 << bit); |
periph->periph_freetags[word] &= ~(1U << bit); |
tag = (word << 5) | bit; |
tag = (word << 5) | bit; |
|
|
/* XXX Should eventually disallow this completely. */ |
/* XXX Should eventually disallow this completely. */ |
Line 436 scsipi_put_tag(struct scsipi_xfer *xs) |
|
Line 436 scsipi_put_tag(struct scsipi_xfer *xs) |
|
word = xs->xs_tag_id >> 5; |
word = xs->xs_tag_id >> 5; |
bit = xs->xs_tag_id & 0x1f; |
bit = xs->xs_tag_id & 0x1f; |
|
|
periph->periph_freetags[word] |= (1 << bit); |
periph->periph_freetags[word] |= (1U << bit); |
} |
} |
|
|
/* |
/* |
Line 1424 scsipi_get_opcodeinfo(struct scsipi_peri |
|
Line 1424 scsipi_get_opcodeinfo(struct scsipi_peri |
|
* if timeout exists insert maximum into opcode table |
* if timeout exists insert maximum into opcode table |
*/ |
*/ |
|
|
data = malloc(len, M_DEVBUF, M_NOWAIT|M_ZERO); |
data = malloc(len, M_DEVBUF, M_WAITOK|M_ZERO); |
if (data == NULL) { |
|
SC_DEBUG(periph, SCSIPI_DB3, |
|
("unable to allocate data buffer " |
|
"for REPORT SUPPORTED OPERATION CODES\n")); |
|
return; |
|
} |
|
|
|
memset(&cmd, 0, sizeof(cmd)); |
memset(&cmd, 0, sizeof(cmd)); |
|
|
cmd.opcode = SCSI_MAINTENANCE_IN; |
cmd.opcode = SCSI_MAINTENANCE_IN; |
cmd.svcaction = RSOC_REPORT_SUPPORTED_OPCODES; |
cmd.svcaction = RSOC_REPORT_SUPPORTED_OPCODES; |
cmd.repoption = RSOC_RCTD|RSOC_ALL; |
cmd.repoption = RSOC_RCTD|RSOC_ALL; |
Line 1453 scsipi_get_opcodeinfo(struct scsipi_peri |
|
Line 1446 scsipi_get_opcodeinfo(struct scsipi_peri |
|
SC_DEBUG(periph, SCSIPI_DB3, |
SC_DEBUG(periph, SCSIPI_DB3, |
("CMD LEN SA spec nom. time cmd timeout\n")); |
("CMD LEN SA spec nom. time cmd timeout\n")); |
|
|
struct scsipi_opcodes *tot = |
struct scsipi_opcodes *tot = malloc(sizeof(struct scsipi_opcodes), |
(struct scsipi_opcodes *)malloc(sizeof(struct scsipi_opcodes), |
M_DEVBUF, M_WAITOK|M_ZERO); |
M_DEVBUF, M_NOWAIT|M_ZERO); |
|
|
|
count = 0; |
count = 0; |
while (tot != NULL && |
while (tot != NULL && |