aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ultrastor.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ultrastor.c')
-rw-r--r--drivers/scsi/ultrastor.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c
index 6d1f0edd7985..75eca6b22db5 100644
--- a/drivers/scsi/ultrastor.c
+++ b/drivers/scsi/ultrastor.c
@@ -298,9 +298,16 @@ static inline int find_and_clear_bit_16(unsigned long *field)
298{ 298{
299 int rv; 299 int rv;
300 300
301 if (*field == 0) panic("No free mscp"); 301 if (*field == 0)
302 asm("xorl %0,%0\n0:\tbsfw %1,%w0\n\tbtr %0,%1\n\tjnc 0b" 302 panic("No free mscp");
303 : "=&r" (rv), "=m" (*field) : "1" (*field)); 303
304 asm volatile (
305 "xorl %0,%0\n\t"
306 "0: bsfw %1,%w0\n\t"
307 "btr %0,%1\n\t"
308 "jnc 0b"
309 : "=&r" (rv), "=m" (*field) :);
310
304 return rv; 311 return rv;
305} 312}
306 313
@@ -741,7 +748,7 @@ static int ultrastor_queuecommand(struct scsi_cmnd *SCpnt,
741 } 748 }
742 my_mscp->command_link = 0; /*???*/ 749 my_mscp->command_link = 0; /*???*/
743 my_mscp->scsi_command_link_id = 0; /*???*/ 750 my_mscp->scsi_command_link_id = 0; /*???*/
744 my_mscp->length_of_sense_byte = sizeof SCpnt->sense_buffer; 751 my_mscp->length_of_sense_byte = SCSI_SENSE_BUFFERSIZE;
745 my_mscp->length_of_scsi_cdbs = SCpnt->cmd_len; 752 my_mscp->length_of_scsi_cdbs = SCpnt->cmd_len;
746 memcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs); 753 memcpy(my_mscp->scsi_cdbs, SCpnt->cmnd, my_mscp->length_of_scsi_cdbs);
747 my_mscp->adapter_status = 0; 754 my_mscp->adapter_status = 0;