Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
92d5de7f
Commit
92d5de7f
authored
Aug 25, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kill some dead code in sym2
No need to keep around the non-dma mapping code in 2.6
parent
befc3801
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
66 deletions
+1
-66
drivers/scsi/sym53c8xx_2/sym_glue.c
drivers/scsi/sym53c8xx_2/sym_glue.c
+1
-44
drivers/scsi/sym53c8xx_2/sym_glue.h
drivers/scsi/sym53c8xx_2/sym_glue.h
+0
-22
No files found.
drivers/scsi/sym53c8xx_2/sym_glue.c
View file @
92d5de7f
...
@@ -139,8 +139,6 @@ void sym_mfree(void *m, int size, char *name)
...
@@ -139,8 +139,6 @@ void sym_mfree(void *m, int size, char *name)
SYM_UNLOCK_DRIVER
(
flags
);
SYM_UNLOCK_DRIVER
(
flags
);
}
}
#ifdef SYM_LINUX_DYNAMIC_DMA_MAPPING
void
*
__sym_calloc_dma
(
m_pool_ident_t
dev_dmat
,
int
size
,
char
*
name
)
void
*
__sym_calloc_dma
(
m_pool_ident_t
dev_dmat
,
int
size
,
char
*
name
)
{
{
u_long
flags
;
u_long
flags
;
...
@@ -169,9 +167,6 @@ m_addr_t __vtobus(m_pool_ident_t dev_dmat, void *m)
...
@@ -169,9 +167,6 @@ m_addr_t __vtobus(m_pool_ident_t dev_dmat, void *m)
return
b
;
return
b
;
}
}
#endif
/* SYM_LINUX_DYNAMIC_DMA_MAPPING */
/*
/*
* Map/unmap a PCI memory window.
* Map/unmap a PCI memory window.
*/
*/
...
@@ -204,11 +199,7 @@ struct host_data {
...
@@ -204,11 +199,7 @@ struct host_data {
/*
/*
* Some type that fit DMA addresses as seen from BUS.
* Some type that fit DMA addresses as seen from BUS.
*/
*/
#ifndef SYM_LINUX_DYNAMIC_DMA_MAPPING
typedef
u_long
bus_addr_t
;
#else
typedef
dma_addr_t
bus_addr_t
;
typedef
dma_addr_t
bus_addr_t
;
#endif
/*
/*
* Used by the eh thread to wait for command completion.
* Used by the eh thread to wait for command completion.
...
@@ -227,10 +218,8 @@ struct sym_eh_wait {
...
@@ -227,10 +218,8 @@ struct sym_eh_wait {
*/
*/
struct
sym_ucmd
{
/* Override the SCSI pointer structure */
struct
sym_ucmd
{
/* Override the SCSI pointer structure */
SYM_QUEHEAD
link_cmdq
;
/* Must stay at offset ZERO */
SYM_QUEHEAD
link_cmdq
;
/* Must stay at offset ZERO */
#ifdef SYM_LINUX_DYNAMIC_DMA_MAPPING
bus_addr_t
data_mapping
;
bus_addr_t
data_mapping
;
u_char
data_mapped
;
u_char
data_mapped
;
#endif
struct
sym_eh_wait
*
eh_wait
;
struct
sym_eh_wait
*
eh_wait
;
};
};
...
@@ -243,39 +232,18 @@ typedef struct sym_ucmd *ucmd_p;
...
@@ -243,39 +232,18 @@ typedef struct sym_ucmd *ucmd_p;
/*
/*
* Deal with DMA mapping/unmapping.
* Deal with DMA mapping/unmapping.
*/
*/
#ifndef SYM_LINUX_DYNAMIC_DMA_MAPPING
/* Linux versions prior to pci bus iommu kernel interface */
#define __unmap_scsi_data(pdev, cmd) do {; } while (0)
#define __map_scsi_single_data(pdev, cmd) (__vtobus(pdev,(cmd)->request_buffer))
#define __map_scsi_sg_data(pdev, cmd) ((cmd)->use_sg)
#define __sync_scsi_data(pdev, cmd) do {; } while (0)
#define bus_sg_dma_address(sc) vtobus((sc)->address)
#define bus_sg_dma_len(sc) ((sc)->length)
#else
/* Linux version with pci bus iommu kernel interface */
#define bus_unmap_sg(pdev, sgptr, sgcnt, dir) \
#define bus_unmap_sg(pdev, sgptr, sgcnt, dir) \
pci_unmap_sg(pdev, sgptr, sgcnt, dir)
pci_unmap_sg(pdev, sgptr, sgcnt, dir)
#define bus_unmap_single(pdev, mapping, bufptr, dir) \
#define bus_unmap_single(pdev, mapping, bufptr, dir) \
pci_unmap_single(pdev, mapping, bufptr, dir)
pci_unmap_single(pdev, mapping, bufptr, dir)
#define bus_map_single(pdev, bufptr, bufsiz, dir) \
#define bus_map_single(pdev, bufptr, bufsiz, dir) \
pci_map_single(pdev, bufptr, bufsiz, dir)
pci_map_single(pdev, bufptr, bufsiz, dir)
#define bus_map_sg(pdev, sgptr, sgcnt, dir) \
#define bus_map_sg(pdev, sgptr, sgcnt, dir) \
pci_map_sg(pdev, sgptr, sgcnt, dir)
pci_map_sg(pdev, sgptr, sgcnt, dir)
#define bus_dma_sync_sg(pdev, sgptr, sgcnt, dir) \
#define bus_dma_sync_sg(pdev, sgptr, sgcnt, dir) \
pci_dma_sync_sg(pdev, sgptr, sgcnt, dir)
pci_dma_sync_sg(pdev, sgptr, sgcnt, dir)
#define bus_dma_sync_single(pdev, mapping, bufsiz, dir) \
#define bus_dma_sync_single(pdev, mapping, bufsiz, dir) \
pci_dma_sync_single(pdev, mapping, bufsiz, dir)
pci_dma_sync_single(pdev, mapping, bufsiz, dir)
#define bus_sg_dma_address(sc) sg_dma_address(sc)
#define bus_sg_dma_address(sc) sg_dma_address(sc)
#define bus_sg_dma_len(sc) sg_dma_len(sc)
#define bus_sg_dma_len(sc) sg_dma_len(sc)
...
@@ -339,8 +307,6 @@ static void __sync_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
...
@@ -339,8 +307,6 @@ static void __sync_scsi_data(struct pci_dev *pdev, struct scsi_cmnd *cmd)
}
}
}
}
#endif
/* SYM_LINUX_DYNAMIC_DMA_MAPPING */
#define unmap_scsi_data(np, cmd) \
#define unmap_scsi_data(np, cmd) \
__unmap_scsi_data(np->s.device, cmd)
__unmap_scsi_data(np->s.device, cmd)
#define map_scsi_single_data(np, cmd) \
#define map_scsi_single_data(np, cmd) \
...
@@ -1742,7 +1708,6 @@ static void sym_free_resources(hcb_p np)
...
@@ -1742,7 +1708,6 @@ static void sym_free_resources(hcb_p np)
/*
/*
* Ask/tell the system about DMA addressing.
* Ask/tell the system about DMA addressing.
*/
*/
#ifdef SYM_LINUX_DYNAMIC_DMA_MAPPING
static
int
sym_setup_bus_dma_mask
(
hcb_p
np
)
static
int
sym_setup_bus_dma_mask
(
hcb_p
np
)
{
{
#if SYM_CONF_DMA_ADDRESSING_MODE == 0
#if SYM_CONF_DMA_ADDRESSING_MODE == 0
...
@@ -1774,7 +1739,6 @@ static int sym_setup_bus_dma_mask(hcb_p np)
...
@@ -1774,7 +1739,6 @@ static int sym_setup_bus_dma_mask(hcb_p np)
sym_name
(
np
));
sym_name
(
np
));
return
-
1
;
return
-
1
;
}
}
#endif
/* SYM_LINUX_DYNAMIC_DMA_MAPPING */
/*
/*
* Host attach and initialisations.
* Host attach and initialisations.
...
@@ -1831,7 +1795,6 @@ sym_attach (struct scsi_host_template *tpnt, int unit, sym_device *dev)
...
@@ -1831,7 +1795,6 @@ sym_attach (struct scsi_host_template *tpnt, int unit, sym_device *dev)
* We keep track in the HCB of all the resources that
* We keep track in the HCB of all the resources that
* are to be released on error.
* are to be released on error.
*/
*/
#ifdef SYM_LINUX_DYNAMIC_DMA_MAPPING
np
=
__sym_calloc_dma
(
dev
->
pdev
,
sizeof
(
*
np
),
"HCB"
);
np
=
__sym_calloc_dma
(
dev
->
pdev
,
sizeof
(
*
np
),
"HCB"
);
if
(
np
)
{
if
(
np
)
{
np
->
s
.
device
=
dev
->
pdev
;
np
->
s
.
device
=
dev
->
pdev
;
...
@@ -1839,11 +1802,7 @@ sym_attach (struct scsi_host_template *tpnt, int unit, sym_device *dev)
...
@@ -1839,11 +1802,7 @@ sym_attach (struct scsi_host_template *tpnt, int unit, sym_device *dev)
}
}
else
else
goto
attach_failed
;
goto
attach_failed
;
#else
np
=
sym_calloc_dma
(
sizeof
(
*
np
),
"HCB"
);
if
(
!
np
)
goto
attach_failed
;
#endif
host_data
->
ncb
=
np
;
host_data
->
ncb
=
np
;
np
->
s
.
host
=
instance
;
np
->
s
.
host
=
instance
;
...
@@ -1877,10 +1836,8 @@ sym_attach (struct scsi_host_template *tpnt, int unit, sym_device *dev)
...
@@ -1877,10 +1836,8 @@ sym_attach (struct scsi_host_template *tpnt, int unit, sym_device *dev)
/*
/*
* Ask/tell the system about DMA addressing.
* Ask/tell the system about DMA addressing.
*/
*/
#ifdef SYM_LINUX_DYNAMIC_DMA_MAPPING
if
(
sym_setup_bus_dma_mask
(
np
))
if
(
sym_setup_bus_dma_mask
(
np
))
goto
attach_failed
;
goto
attach_failed
;
#endif
/*
/*
* Try to map the controller chip to
* Try to map the controller chip to
...
...
drivers/scsi/sym53c8xx_2/sym_glue.h
View file @
92d5de7f
...
@@ -111,8 +111,6 @@ typedef u_long vm_offset_t;
...
@@ -111,8 +111,6 @@ typedef u_long vm_offset_t;
/*
/*
* Configuration addendum for Linux.
* Configuration addendum for Linux.
*/
*/
#define SYM_LINUX_DYNAMIC_DMA_MAPPING
#define SYM_CONF_TIMER_INTERVAL ((HZ+1)/2)
#define SYM_CONF_TIMER_INTERVAL ((HZ+1)/2)
#define SYM_OPT_HANDLE_DIR_UNKNOWN
#define SYM_OPT_HANDLE_DIR_UNKNOWN
...
@@ -121,10 +119,7 @@ typedef u_long vm_offset_t;
...
@@ -121,10 +119,7 @@ typedef u_long vm_offset_t;
#define SYM_OPT_SNIFF_INQUIRY
#define SYM_OPT_SNIFF_INQUIRY
#define SYM_OPT_LIMIT_COMMAND_REORDERING
#define SYM_OPT_LIMIT_COMMAND_REORDERING
#define SYM_OPT_ANNOUNCE_TRANSFER_RATE
#define SYM_OPT_ANNOUNCE_TRANSFER_RATE
#ifdef SYM_LINUX_DYNAMIC_DMA_MAPPING
#define SYM_OPT_BUS_DMA_ABSTRACTION
#define SYM_OPT_BUS_DMA_ABSTRACTION
#endif
/*
/*
* Print a message with severity.
* Print a message with severity.
...
@@ -496,9 +491,7 @@ typedef u_long m_addr_t; /* Enough bits to represent any address */
...
@@ -496,9 +491,7 @@ typedef u_long m_addr_t; /* Enough bits to represent any address */
#ifdef MODULE
#ifdef MODULE
#define SYM_MEM_FREE_UNUSED
/* Free unused pages immediately */
#define SYM_MEM_FREE_UNUSED
/* Free unused pages immediately */
#endif
#endif
#ifdef SYM_LINUX_DYNAMIC_DMA_MAPPING
typedef
struct
pci_dev
*
m_pool_ident_t
;
typedef
struct
pci_dev
*
m_pool_ident_t
;
#endif
/*
/*
* Include driver soft definitions.
* Include driver soft definitions.
...
@@ -521,19 +514,7 @@ typedef struct pci_dev *m_pool_ident_t;
...
@@ -521,19 +514,7 @@ typedef struct pci_dev *m_pool_ident_t;
void
*
sym_calloc
(
int
size
,
char
*
name
);
void
*
sym_calloc
(
int
size
,
char
*
name
);
void
sym_mfree
(
void
*
m
,
int
size
,
char
*
name
);
void
sym_mfree
(
void
*
m
,
int
size
,
char
*
name
);
#ifndef SYM_LINUX_DYNAMIC_DMA_MAPPING
/*
/*
* Simple case.
* All the memory assummed DMAable and O/S providing virtual
* to bus physical address translation.
*/
#define __sym_calloc_dma(pool_id, size, name) sym_calloc(size, name)
#define __sym_mfree_dma(pool_id, m, size, name) sym_mfree(m, size, name)
#define __vtobus(b, p) virt_to_bus(p)
#else
/* SYM_LINUX_DYNAMIC_DMA_MAPPING */
/*
* Complex case.
* We have to provide the driver memory allocator with methods for
* We have to provide the driver memory allocator with methods for
* it to maintain virtual to bus physical address translations.
* it to maintain virtual to bus physical address translations.
*/
*/
...
@@ -560,15 +541,12 @@ static __inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
...
@@ -560,15 +541,12 @@ static __inline void sym_m_free_dma_mem_cluster(m_pool_p mp, m_vtob_p vbp)
}
}
#define sym_m_create_dma_mem_tag(mp) (0)
#define sym_m_create_dma_mem_tag(mp) (0)
#define sym_m_delete_dma_mem_tag(mp) do { ; } while (0)
#define sym_m_delete_dma_mem_tag(mp) do { ; } while (0)
void
*
__sym_calloc_dma
(
m_pool_ident_t
dev_dmat
,
int
size
,
char
*
name
);
void
*
__sym_calloc_dma
(
m_pool_ident_t
dev_dmat
,
int
size
,
char
*
name
);
void
__sym_mfree_dma
(
m_pool_ident_t
dev_dmat
,
void
*
m
,
int
size
,
char
*
name
);
void
__sym_mfree_dma
(
m_pool_ident_t
dev_dmat
,
void
*
m
,
int
size
,
char
*
name
);
m_addr_t
__vtobus
(
m_pool_ident_t
dev_dmat
,
void
*
m
);
m_addr_t
__vtobus
(
m_pool_ident_t
dev_dmat
,
void
*
m
);
#endif
/* SYM_LINUX_DYNAMIC_DMA_MAPPING */
/*
/*
* Set the status field of a CAM CCB.
* Set the status field of a CAM CCB.
*/
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment