scsi_lib.c (b22364c8eec89e6b0c081a237f3b6348df87796f) scsi_lib.c (c376222960ae91d5ffb9197ee36771aaed1d9f90)
1/*
2 * scsi_lib.c Copyright (C) 1999 Eric Youngdale
3 *
4 * SCSI queueing library.
5 * Initial versions: Eric Youngdale (eric@andante.org).
6 * Based upon conversations with large numbers
7 * of people at Linux Expo.
8 */

--- 374 unchanged lines hidden (view full) ---

383 int use_sg, int timeout, int retries, void *privdata,
384 void (*done)(void *, char *, int, int), gfp_t gfp)
385{
386 struct request *req;
387 struct scsi_io_context *sioc;
388 int err = 0;
389 int write = (data_direction == DMA_TO_DEVICE);
390
1/*
2 * scsi_lib.c Copyright (C) 1999 Eric Youngdale
3 *
4 * SCSI queueing library.
5 * Initial versions: Eric Youngdale (eric@andante.org).
6 * Based upon conversations with large numbers
7 * of people at Linux Expo.
8 */

--- 374 unchanged lines hidden (view full) ---

383 int use_sg, int timeout, int retries, void *privdata,
384 void (*done)(void *, char *, int, int), gfp_t gfp)
385{
386 struct request *req;
387 struct scsi_io_context *sioc;
388 int err = 0;
389 int write = (data_direction == DMA_TO_DEVICE);
390
391 sioc = kmem_cache_alloc(scsi_io_context_cache, gfp);
391 sioc = kmem_cache_zalloc(scsi_io_context_cache, gfp);
392 if (!sioc)
393 return DRIVER_ERROR << 24;
392 if (!sioc)
393 return DRIVER_ERROR << 24;
394 memset(sioc, 0, sizeof(*sioc));
395
396 req = blk_get_request(sdev->request_queue, write, gfp);
397 if (!req)
398 goto free_sense;
399 req->cmd_type = REQ_TYPE_BLOCK_PC;
400 req->cmd_flags |= REQ_QUIET;
401
402 if (use_sg)

--- 1891 unchanged lines hidden ---
394
395 req = blk_get_request(sdev->request_queue, write, gfp);
396 if (!req)
397 goto free_sense;
398 req->cmd_type = REQ_TYPE_BLOCK_PC;
399 req->cmd_flags |= REQ_QUIET;
400
401 if (use_sg)

--- 1891 unchanged lines hidden ---