mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
[PATCH] gfp_t: drivers/scsi
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
9796fdd829
commit
c53033f6b0
14 changed files with 26 additions and 20 deletions
|
@ -1357,7 +1357,7 @@ static int port_detect(unsigned long port_base, unsigned int j,
|
|||
|
||||
for (i = 0; i < shost->can_queue; i++) {
|
||||
size_t sz = shost->sg_tablesize *sizeof(struct sg_list);
|
||||
unsigned int gfp_mask = (shost->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC;
|
||||
gfp_t gfp_mask = (shost->unchecked_isa_dma ? GFP_DMA : 0) | GFP_ATOMIC;
|
||||
ha->cp[i].sglist = kmalloc(sz, gfp_mask);
|
||||
if (!ha->cp[i].sglist) {
|
||||
printk
|
||||
|
|
|
@ -287,7 +287,8 @@ static void scsi_host_dev_release(struct device *dev)
|
|||
struct Scsi_Host *scsi_host_alloc(struct scsi_host_template *sht, int privsize)
|
||||
{
|
||||
struct Scsi_Host *shost;
|
||||
int gfp_mask = GFP_KERNEL, rval;
|
||||
gfp_t gfp_mask = GFP_KERNEL;
|
||||
int rval;
|
||||
|
||||
if (sht->unchecked_isa_dma && privsize)
|
||||
gfp_mask |= __GFP_DMA;
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
#define LPFC_MEM_POOL_SIZE 64 /* max elem in non-DMA safety pool */
|
||||
|
||||
static void *
|
||||
lpfc_pool_kmalloc(unsigned int gfp_flags, void *data)
|
||||
lpfc_pool_kmalloc(gfp_t gfp_flags, void *data)
|
||||
{
|
||||
return kmalloc((unsigned long)data, gfp_flags);
|
||||
}
|
||||
|
|
|
@ -5146,7 +5146,8 @@ static long osst_compat_ioctl(struct file * file, unsigned int cmd_in, unsigned
|
|||
/* Try to allocate a new tape buffer skeleton. Caller must not hold os_scsi_tapes_lock */
|
||||
static struct osst_buffer * new_tape_buffer( int from_initialization, int need_dma, int max_sg )
|
||||
{
|
||||
int i, priority;
|
||||
int i;
|
||||
gfp_t priority;
|
||||
struct osst_buffer *tb;
|
||||
|
||||
if (from_initialization)
|
||||
|
@ -5178,7 +5179,8 @@ static struct osst_buffer * new_tape_buffer( int from_initialization, int need_d
|
|||
/* Try to allocate a temporary (while a user has the device open) enlarged tape buffer */
|
||||
static int enlarge_buffer(struct osst_buffer *STbuffer, int need_dma)
|
||||
{
|
||||
int segs, nbr, max_segs, b_size, priority, order, got;
|
||||
int segs, nbr, max_segs, b_size, order, got;
|
||||
gfp_t priority;
|
||||
|
||||
if (STbuffer->buffer_size >= OS_FRAME_SIZE)
|
||||
return 1;
|
||||
|
|
|
@ -52,7 +52,7 @@ extern int qla2x00_load_risc(struct scsi_qla_host *, uint32_t *);
|
|||
extern int qla24xx_load_risc_flash(scsi_qla_host_t *, uint32_t *);
|
||||
extern int qla24xx_load_risc_hotplug(scsi_qla_host_t *, uint32_t *);
|
||||
|
||||
extern fc_port_t *qla2x00_alloc_fcport(scsi_qla_host_t *, int);
|
||||
extern fc_port_t *qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t);
|
||||
|
||||
extern int qla2x00_loop_resync(scsi_qla_host_t *);
|
||||
|
||||
|
@ -277,7 +277,7 @@ extern int qla2x00_fdmi_register(scsi_qla_host_t *);
|
|||
/*
|
||||
* Global Function Prototypes in qla_rscn.c source file.
|
||||
*/
|
||||
extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, int);
|
||||
extern fc_port_t *qla2x00_alloc_rscn_fcport(scsi_qla_host_t *, gfp_t);
|
||||
extern int qla2x00_handle_port_rscn(scsi_qla_host_t *, uint32_t, fc_port_t *,
|
||||
int);
|
||||
extern void qla2x00_process_iodesc(scsi_qla_host_t *, struct mbx_entry *);
|
||||
|
|
|
@ -1685,7 +1685,7 @@ qla2x00_nvram_config(scsi_qla_host_t *ha)
|
|||
* Returns a pointer to the allocated fcport, or NULL, if none available.
|
||||
*/
|
||||
fc_port_t *
|
||||
qla2x00_alloc_fcport(scsi_qla_host_t *ha, int flags)
|
||||
qla2x00_alloc_fcport(scsi_qla_host_t *ha, gfp_t flags)
|
||||
{
|
||||
fc_port_t *fcport;
|
||||
|
||||
|
|
|
@ -1066,7 +1066,7 @@ qla2x00_send_login_iocb_cb(scsi_qla_host_t *ha, struct io_descriptor *iodesc,
|
|||
* Returns a pointer to the allocated RSCN fcport, or NULL, if none available.
|
||||
*/
|
||||
fc_port_t *
|
||||
qla2x00_alloc_rscn_fcport(scsi_qla_host_t *ha, int flags)
|
||||
qla2x00_alloc_rscn_fcport(scsi_qla_host_t *ha, gfp_t flags)
|
||||
{
|
||||
fc_port_t *fcport;
|
||||
|
||||
|
|
|
@ -130,7 +130,7 @@ EXPORT_SYMBOL(scsi_device_types);
|
|||
* Returns: Pointer to request block.
|
||||
*/
|
||||
struct scsi_request *scsi_allocate_request(struct scsi_device *sdev,
|
||||
int gfp_mask)
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
const int offset = ALIGN(sizeof(struct scsi_request), 4);
|
||||
const int size = offset + sizeof(struct request);
|
||||
|
@ -196,7 +196,7 @@ struct scsi_host_cmd_pool {
|
|||
unsigned int users;
|
||||
char *name;
|
||||
unsigned int slab_flags;
|
||||
unsigned int gfp_mask;
|
||||
gfp_t gfp_mask;
|
||||
};
|
||||
|
||||
static struct scsi_host_cmd_pool scsi_cmd_pool = {
|
||||
|
@ -213,7 +213,7 @@ static struct scsi_host_cmd_pool scsi_cmd_dma_pool = {
|
|||
static DECLARE_MUTEX(host_cmd_pool_mutex);
|
||||
|
||||
static struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost,
|
||||
int gfp_mask)
|
||||
gfp_t gfp_mask)
|
||||
{
|
||||
struct scsi_cmnd *cmd;
|
||||
|
||||
|
@ -245,7 +245,7 @@ static struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *shost,
|
|||
*
|
||||
* Returns: The allocated scsi command structure.
|
||||
*/
|
||||
struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, int gfp_mask)
|
||||
struct scsi_cmnd *scsi_get_command(struct scsi_device *dev, gfp_t gfp_mask)
|
||||
{
|
||||
struct scsi_cmnd *cmd;
|
||||
|
||||
|
|
|
@ -205,7 +205,8 @@ int scsi_ioctl_send_command(struct scsi_device *sdev,
|
|||
unsigned int inlen, outlen, cmdlen;
|
||||
unsigned int needed, buf_needed;
|
||||
int timeout, retries, result;
|
||||
int data_direction, gfp_mask = GFP_KERNEL;
|
||||
int data_direction;
|
||||
gfp_t gfp_mask = GFP_KERNEL;
|
||||
|
||||
if (!sic)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -677,7 +677,7 @@ static struct scsi_cmnd *scsi_end_request(struct scsi_cmnd *cmd, int uptodate,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, int gfp_mask)
|
||||
static struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *cmd, gfp_t gfp_mask)
|
||||
{
|
||||
struct scsi_host_sg_pool *sgp;
|
||||
struct scatterlist *sgl;
|
||||
|
|
|
@ -2644,7 +2644,7 @@ static char *
|
|||
sg_page_malloc(int rqSz, int lowDma, int *retSzp)
|
||||
{
|
||||
char *resp = NULL;
|
||||
int page_mask;
|
||||
gfp_t page_mask;
|
||||
int order, a_size;
|
||||
int resSz = rqSz;
|
||||
|
||||
|
|
|
@ -3577,7 +3577,8 @@ static long st_compat_ioctl(struct file *file, unsigned int cmd, unsigned long a
|
|||
static struct st_buffer *
|
||||
new_tape_buffer(int from_initialization, int need_dma, int max_sg)
|
||||
{
|
||||
int i, priority, got = 0, segs = 0;
|
||||
int i, got = 0, segs = 0;
|
||||
gfp_t priority;
|
||||
struct st_buffer *tb;
|
||||
|
||||
if (from_initialization)
|
||||
|
@ -3610,7 +3611,8 @@ static struct st_buffer *
|
|||
/* Try to allocate enough space in the tape buffer */
|
||||
static int enlarge_buffer(struct st_buffer * STbuffer, int new_size, int need_dma)
|
||||
{
|
||||
int segs, nbr, max_segs, b_size, priority, order, got;
|
||||
int segs, nbr, max_segs, b_size, order, got;
|
||||
gfp_t priority;
|
||||
|
||||
if (new_size <= STbuffer->buffer_size)
|
||||
return 1;
|
||||
|
|
|
@ -146,7 +146,7 @@ struct scsi_cmnd {
|
|||
#define SCSI_STATE_MLQUEUE 0x100b
|
||||
|
||||
|
||||
extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, int);
|
||||
extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
|
||||
extern void scsi_put_command(struct scsi_cmnd *);
|
||||
extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int);
|
||||
extern void scsi_finish_command(struct scsi_cmnd *cmd);
|
||||
|
|
|
@ -45,7 +45,7 @@ struct scsi_request {
|
|||
level driver) of this request */
|
||||
};
|
||||
|
||||
extern struct scsi_request *scsi_allocate_request(struct scsi_device *, int);
|
||||
extern struct scsi_request *scsi_allocate_request(struct scsi_device *, gfp_t);
|
||||
extern void scsi_release_request(struct scsi_request *);
|
||||
extern void scsi_wait_req(struct scsi_request *, const void *cmnd,
|
||||
void *buffer, unsigned bufflen,
|
||||
|
|
Loading…
Reference in a new issue