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
nexedi
linux
Commits
9528a458
Commit
9528a458
authored
Jan 10, 2004
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge mulgrave.(none):/home/jejb/BK/linux-2.5
into mulgrave.(none):/home/jejb/BK/scsi-misc-2.7
parents
4576b4fa
b6034f30
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
31 additions
and
32 deletions
+31
-32
drivers/scsi/ini9100u.c
drivers/scsi/ini9100u.c
+6
-6
drivers/scsi/inia100.c
drivers/scsi/inia100.c
+20
-16
drivers/scsi/nsp32.h
drivers/scsi/nsp32.h
+0
-5
drivers/scsi/nsp32_io.h
drivers/scsi/nsp32_io.h
+5
-5
No files found.
drivers/scsi/ini9100u.c
View file @
9528a458
...
@@ -484,7 +484,7 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
...
@@ -484,7 +484,7 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
dma_addr
=
dma_map_single
(
&
pHCB
->
pci_dev
->
dev
,
SCpnt
->
sense_buffer
,
dma_addr
=
dma_map_single
(
&
pHCB
->
pci_dev
->
dev
,
SCpnt
->
sense_buffer
,
SENSE_SIZE
,
DMA_FROM_DEVICE
);
SENSE_SIZE
,
DMA_FROM_DEVICE
);
pSCB
->
SCB_SensePtr
=
cpu_to_le32
((
u32
)
dma_addr
);
pSCB
->
SCB_SensePtr
=
cpu_to_le32
((
u32
)
dma_addr
);
pSCB
->
SCB_SenseLen
=
SENSE_SIZE
;
pSCB
->
SCB_SenseLen
=
cpu_to_le32
(
SENSE_SIZE
)
;
SCpnt
->
SCp
.
ptr
=
(
char
*
)(
unsigned
long
)
dma_addr
;
SCpnt
->
SCp
.
ptr
=
(
char
*
)(
unsigned
long
)
dma_addr
;
pSCB
->
SCB_CDBLen
=
SCpnt
->
cmd_len
;
pSCB
->
SCB_CDBLen
=
SCpnt
->
cmd_len
;
...
@@ -502,7 +502,7 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
...
@@ -502,7 +502,7 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
dma_addr
=
dma_map_single
(
&
pHCB
->
pci_dev
->
dev
,
&
pSCB
->
SCB_SGList
[
0
],
dma_addr
=
dma_map_single
(
&
pHCB
->
pci_dev
->
dev
,
&
pSCB
->
SCB_SGList
[
0
],
sizeof
(
struct
SG_Struc
)
*
TOTAL_SG_ENTRY
,
sizeof
(
struct
SG_Struc
)
*
TOTAL_SG_ENTRY
,
DMA_BIDIRECTIONAL
);
DMA_BIDIRECTIONAL
);
pSCB
->
SCB_BufPtr
=
dma_addr
;
pSCB
->
SCB_BufPtr
=
cpu_to_le32
((
u32
)
dma_addr
)
;
SCpnt
->
SCp
.
dma_handle
=
dma_addr
;
SCpnt
->
SCp
.
dma_handle
=
dma_addr
;
pSrbSG
=
(
struct
scatterlist
*
)
SCpnt
->
request_buffer
;
pSrbSG
=
(
struct
scatterlist
*
)
SCpnt
->
request_buffer
;
...
@@ -512,8 +512,8 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
...
@@ -512,8 +512,8 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
pSCB
->
SCB_Flags
|=
SCF_SG
;
/* Turn on SG list flag */
pSCB
->
SCB_Flags
|=
SCF_SG
;
/* Turn on SG list flag */
for
(
i
=
0
,
TotalLen
=
0
,
pSG
=
&
pSCB
->
SCB_SGList
[
0
];
/* 1.01g */
for
(
i
=
0
,
TotalLen
=
0
,
pSG
=
&
pSCB
->
SCB_SGList
[
0
];
/* 1.01g */
i
<
pSCB
->
SCB_SGLen
;
i
++
,
pSG
++
,
pSrbSG
++
)
{
i
<
pSCB
->
SCB_SGLen
;
i
++
,
pSG
++
,
pSrbSG
++
)
{
pSG
->
SG_Ptr
=
(
u32
)
sg_dma_address
(
pSrbSG
);
pSG
->
SG_Ptr
=
cpu_to_le32
((
u32
)
sg_dma_address
(
pSrbSG
)
);
TotalLen
+=
pSG
->
SG_Len
=
(
u32
)
sg_dma_len
(
pSrbSG
);
TotalLen
+=
pSG
->
SG_Len
=
cpu_to_le32
((
u32
)
sg_dma_len
(
pSrbSG
)
);
}
}
pSCB
->
SCB_BufLen
=
(
SCpnt
->
request_bufflen
>
TotalLen
)
?
pSCB
->
SCB_BufLen
=
(
SCpnt
->
request_bufflen
>
TotalLen
)
?
...
@@ -523,8 +523,8 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
...
@@ -523,8 +523,8 @@ static void i91uBuildSCB(HCS * pHCB, SCB * pSCB, Scsi_Cmnd * SCpnt)
SCpnt
->
request_bufflen
,
SCpnt
->
request_bufflen
,
SCpnt
->
sc_data_direction
);
SCpnt
->
sc_data_direction
);
SCpnt
->
SCp
.
dma_handle
=
dma_addr
;
SCpnt
->
SCp
.
dma_handle
=
dma_addr
;
pSCB
->
SCB_BufPtr
=
(
u32
)
dma_addr
;
pSCB
->
SCB_BufPtr
=
cpu_to_le32
((
u32
)
dma_addr
)
;
pSCB
->
SCB_BufLen
=
(
u32
)
SCpnt
->
request_bufflen
;
pSCB
->
SCB_BufLen
=
cpu_to_le32
((
u32
)
SCpnt
->
request_bufflen
)
;
pSCB
->
SCB_SGLen
=
0
;
pSCB
->
SCB_SGLen
=
0
;
}
else
{
}
else
{
pSCB
->
SCB_BufLen
=
0
;
pSCB
->
SCB_BufLen
=
0
;
...
...
drivers/scsi/inia100.c
View file @
9528a458
...
@@ -420,7 +420,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
...
@@ -420,7 +420,7 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
struct
Scsi_Host
*
shost
;
struct
Scsi_Host
*
shost
;
ORC_HCS
*
pHCB
;
ORC_HCS
*
pHCB
;
unsigned
long
port
,
bios
;
unsigned
long
port
,
bios
;
int
ok
=
-
ENODEV
;
int
error
=
-
ENODEV
;
u32
sz
;
u32
sz
;
unsigned
long
dBiosAdr
;
unsigned
long
dBiosAdr
;
char
*
pbBiosAdr
;
char
*
pbBiosAdr
;
...
@@ -433,17 +433,17 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
...
@@ -433,17 +433,17 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
goto
out_disable_device
;
goto
out_disable_device
;
}
}
pci_set_master
(
pdev
);
port
=
pci_resource_start
(
pdev
,
0
);
port
=
pci_resource_start
(
pdev
,
0
);
if
(
!
request_region
(
pHCB
->
HCS_Base
,
256
,
"inia100"
))
{
if
(
!
request_region
(
port
,
256
,
"inia100"
))
{
printk
(
KERN_WARNING
"inia100: io port 0x%x, is busy.
\n
"
,
printk
(
KERN_WARNING
"inia100: io port 0x%lx, is busy.
\n
"
,
port
);
pHCB
->
HCS_Base
);
goto
out_disable_device
;
goto
out_disable_device
;
/* XXX: undo init_orchid() ?? */
}
}
/* <02> read from base address + 0x50 offset to get the bios balue. */
/* <02> read from base address + 0x50 offset to get the bios balue. */
bios
=
ORC_RDWORD
(
port
,
0x50
);
bios
=
ORC_RDWORD
(
port
,
0x50
);
pci_set_master
(
pdev
);
shost
=
scsi_host_alloc
(
&
inia100_template
,
sizeof
(
ORC_HCS
));
shost
=
scsi_host_alloc
(
&
inia100_template
,
sizeof
(
ORC_HCS
));
if
(
!
shost
)
if
(
!
shost
)
...
@@ -460,7 +460,8 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
...
@@ -460,7 +460,8 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
/* Get total memory needed for SCB */
/* Get total memory needed for SCB */
sz
=
ORC_MAXQUEUE
*
sizeof
(
ORC_SCB
);
sz
=
ORC_MAXQUEUE
*
sizeof
(
ORC_SCB
);
pHCB
->
HCS_virScbArray
=
pci_alloc_consistent
(
pdev
,
sz
,
&
pHCB
->
HCS_physScbArray
);
pHCB
->
HCS_virScbArray
=
pci_alloc_consistent
(
pdev
,
sz
,
&
pHCB
->
HCS_physScbArray
);
if
(
!
pHCB
->
HCS_virScbArray
)
{
if
(
!
pHCB
->
HCS_virScbArray
)
{
printk
(
"inia100: SCB memory allocation error
\n
"
);
printk
(
"inia100: SCB memory allocation error
\n
"
);
goto
out_host_put
;
goto
out_host_put
;
...
@@ -469,7 +470,8 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
...
@@ -469,7 +470,8 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
/* Get total memory needed for ESCB */
/* Get total memory needed for ESCB */
sz
=
ORC_MAXQUEUE
*
sizeof
(
ESCB
);
sz
=
ORC_MAXQUEUE
*
sizeof
(
ESCB
);
pHCB
->
HCS_virEscbArray
=
pci_alloc_consistent
(
pdev
,
sz
,
&
pHCB
->
HCS_physEscbArray
);
pHCB
->
HCS_virEscbArray
=
pci_alloc_consistent
(
pdev
,
sz
,
&
pHCB
->
HCS_physEscbArray
);
if
(
!
pHCB
->
HCS_virEscbArray
)
{
if
(
!
pHCB
->
HCS_virEscbArray
)
{
printk
(
"inia100: ESCB memory allocation error
\n
"
);
printk
(
"inia100: ESCB memory allocation error
\n
"
);
goto
out_free_scb_array
;
goto
out_free_scb_array
;
...
@@ -490,21 +492,23 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
...
@@ -490,21 +492,23 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
shost
->
unique_id
=
shost
->
io_port
;
shost
->
unique_id
=
shost
->
io_port
;
shost
->
max_id
=
pHCB
->
HCS_MaxTar
;
shost
->
max_id
=
pHCB
->
HCS_MaxTar
;
shost
->
max_lun
=
16
;
shost
->
max_lun
=
16
;
shost
->
irq
=
pHCB
->
HCS_Intr
;
shost
->
irq
=
pHCB
->
HCS_Intr
=
pdev
->
irq
;
shost
->
this_id
=
pHCB
->
HCS_SCSI_ID
;
/* Assign HCS index */
shost
->
this_id
=
pHCB
->
HCS_SCSI_ID
;
/* Assign HCS index */
shost
->
sg_tablesize
=
TOTAL_SG_ENTRY
;
shost
->
sg_tablesize
=
TOTAL_SG_ENTRY
;
/* Initial orc chip */
/* Initial orc chip */
ok
=
request_irq
(
pHCB
->
HCS_Intr
,
inia100_intr
,
SA_SHIRQ
,
"inia100"
,
shost
);
error
=
request_irq
(
pdev
->
irq
,
inia100_intr
,
SA_SHIRQ
,
if
(
ok
<
0
)
{
"inia100"
,
shost
);
printk
(
KERN_WARNING
"inia100: unable to get irq %d
\n
"
,
pHCB
->
HCS_Intr
);
if
(
error
<
0
)
{
printk
(
KERN_WARNING
"inia100: unable to get irq %d
\n
"
,
pdev
->
irq
);
goto
out_free_escb_array
;
goto
out_free_escb_array
;
}
}
pci_set_drvdata
(
pdev
,
shost
);
pci_set_drvdata
(
pdev
,
shost
);
ok
=
scsi_add_host
(
shost
,
&
pdev
->
dev
);
error
=
scsi_add_host
(
shost
,
&
pdev
->
dev
);
if
(
!
ok
)
if
(
error
)
goto
out_free_irq
;
goto
out_free_irq
;
scsi_scan_host
(
shost
);
scsi_scan_host
(
shost
);
...
@@ -521,11 +525,11 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
...
@@ -521,11 +525,11 @@ static int __devinit inia100_probe_one(struct pci_dev *pdev,
out_host_put:
out_host_put:
scsi_host_put
(
shost
);
scsi_host_put
(
shost
);
out_release_region:
out_release_region:
release_region
(
p
HCB
->
HCS_Base
,
256
);
release_region
(
p
ort
,
256
);
out_disable_device:
out_disable_device:
pci_disable_device
(
pdev
);
pci_disable_device
(
pdev
);
out:
out:
return
ok
;
return
error
;
}
}
static
void
__devexit
inia100_remove_one
(
struct
pci_dev
*
pdev
)
static
void
__devexit
inia100_remove_one
(
struct
pci_dev
*
pdev
)
...
...
drivers/scsi/nsp32.h
View file @
9528a458
...
@@ -667,10 +667,5 @@ static inline struct Scsi_Host *scsi_host_hn_get(unsigned short hostno)
...
@@ -667,10 +667,5 @@ static inline struct Scsi_Host *scsi_host_hn_get(unsigned short hostno)
}
}
#endif
#endif
/* for Kernel 2.6 */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
# define __devinitdata
/* */
#endif
#endif
/* _NSP32_H */
#endif
/* _NSP32_H */
/* end */
/* end */
drivers/scsi/nsp32_io.h
View file @
9528a458
...
@@ -173,7 +173,7 @@ static inline void nsp32_index_write4(unsigned int base,
...
@@ -173,7 +173,7 @@ static inline void nsp32_index_write4(unsigned int base,
/*==============================================*/
/*==============================================*/
static
inline
unsigned
char
nsp32_mmio_index_read1
(
unsigned
int
base
,
static
inline
unsigned
char
nsp32_mmio_index_read1
(
unsigned
long
base
,
unsigned
int
reg
)
unsigned
int
reg
)
{
{
volatile
unsigned
short
*
index_ptr
,
*
data_ptr
;
volatile
unsigned
short
*
index_ptr
,
*
data_ptr
;
...
@@ -185,7 +185,7 @@ static inline unsigned char nsp32_mmio_index_read1(unsigned int base,
...
@@ -185,7 +185,7 @@ static inline unsigned char nsp32_mmio_index_read1(unsigned int base,
return
readb
(
data_ptr
);
return
readb
(
data_ptr
);
}
}
static
inline
void
nsp32_mmio_index_write1
(
unsigned
int
base
,
static
inline
void
nsp32_mmio_index_write1
(
unsigned
long
base
,
unsigned
int
reg
,
unsigned
int
reg
,
unsigned
char
val
)
unsigned
char
val
)
{
{
...
@@ -198,8 +198,8 @@ static inline void nsp32_mmio_index_write1(unsigned int base,
...
@@ -198,8 +198,8 @@ static inline void nsp32_mmio_index_write1(unsigned int base,
writeb
(
val
,
data_ptr
);
writeb
(
val
,
data_ptr
);
}
}
static
inline
unsigned
short
nsp32_mmio_index_read2
(
unsigned
int
base
,
static
inline
unsigned
short
nsp32_mmio_index_read2
(
unsigned
long
base
,
unsigned
int
reg
)
unsigned
int
reg
)
{
{
volatile
unsigned
short
*
index_ptr
,
*
data_ptr
;
volatile
unsigned
short
*
index_ptr
,
*
data_ptr
;
...
@@ -210,7 +210,7 @@ static inline unsigned short nsp32_mmio_index_read2(unsigned int base,
...
@@ -210,7 +210,7 @@ static inline unsigned short nsp32_mmio_index_read2(unsigned int base,
return
le16_to_cpu
(
readw
(
data_ptr
));
return
le16_to_cpu
(
readw
(
data_ptr
));
}
}
static
inline
void
nsp32_mmio_index_write2
(
unsigned
int
base
,
static
inline
void
nsp32_mmio_index_write2
(
unsigned
long
base
,
unsigned
int
reg
,
unsigned
int
reg
,
unsigned
short
val
)
unsigned
short
val
)
{
{
...
...
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