Lines Matching refs:bufflen

140 			int bufflen, struct sdebug_dev_info * devip);
142 unsigned char * buff, int bufflen,
149 int bufflen, struct sdebug_dev_info * devip);
177 int bufflen = SCpnt->request_bufflen; in scsi_debug_queuecommand() local
190 bufflen = sgpnt[0].length; in scsi_debug_queuecommand()
197 bufflen = SDEBUG_SENSE_LEN; in scsi_debug_queuecommand()
235 errsts = resp_inquiry(cmd, target, buff, bufflen, devip); in scsi_debug_queuecommand()
244 memcpy(buff, sbuff, (bufflen < SDEBUG_SENSE_LEN) ? in scsi_debug_queuecommand()
245 bufflen : SDEBUG_SENSE_LEN); in scsi_debug_queuecommand()
248 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
263 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
266 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
270 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
274 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
278 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
282 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
286 memset(buff, 0, bufflen); in scsi_debug_queuecommand()
287 if (bufflen > 7) { in scsi_debug_queuecommand()
328 errsts = resp_report_luns(cmd, buff, bufflen, devip); in scsi_debug_queuecommand()
362 errsts = resp_mode_sense(cmd, target, buff, bufflen, devip); in scsi_debug_queuecommand()
437 int bufflen, struct sdebug_dev_info * devip) in resp_inquiry() argument
441 int min_len = bufflen > SDEBUG_MAX_INQ_ARR_SZ ? in resp_inquiry()
442 SDEBUG_MAX_INQ_ARR_SZ : bufflen; in resp_inquiry()
444 if (bufflen < cmd[4]) in resp_inquiry()
446 "< alloc_length=%d\n", bufflen, (int)cmd[4]); in resp_inquiry()
447 memset(buff, 0, bufflen); in resp_inquiry()
563 unsigned char * buff, int bufflen, in resp_mode_sense() argument
572 int min_len = bufflen > SDEBUG_MAX_MSENSE_SZ ? in resp_mode_sense()
573 SDEBUG_MAX_MSENSE_SZ : bufflen; in resp_mode_sense()
575 SCSI_LOG_LLQUEUE(3, printk("Mode sense ...(%p %d)\n", buff, bufflen)); in resp_mode_sense()
584 if (bufflen < alloc_len) in resp_mode_sense()
586 "< alloc_length=%d\n", bufflen, alloc_len); in resp_mode_sense()
587 memset(buff, 0, bufflen); in resp_mode_sense()
652 int bufflen = SCpnt->request_bufflen; in resp_read() local
668 nbytes = bufflen; in resp_read()
675 bufflen = sgpnt[sgcount].length; in resp_read()
678 memcpy(buff, fake_storep + (block * SECT_SIZE), bufflen); in resp_read()
679 nbytes -= bufflen; in resp_read()
681 block += bufflen >> POW2_SECT_SIZE; in resp_read()
685 bufflen = sgpnt[sgcount].length; in resp_read()
701 int bufflen = SCpnt->request_bufflen; in resp_write() local
711 nbytes = bufflen; in resp_write()
716 bufflen = sgpnt[sgcount].length; in resp_write()
719 memcpy(fake_storep + (block * SECT_SIZE), buff, bufflen); in resp_write()
721 nbytes -= bufflen; in resp_write()
723 block += bufflen >> POW2_SECT_SIZE; in resp_write()
727 bufflen = sgpnt[sgcount].length; in resp_write()
738 int bufflen, struct sdebug_dev_info * devip) in resp_report_luns() argument
748 if (bufflen > 3) { in resp_report_luns()
749 memset(buff, 0, bufflen); in resp_report_luns()