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
cc3347ed
Commit
cc3347ed
authored
Nov 28, 2002
by
James Bottomley
Browse files
Options
Browse Files
Download
Plain Diff
Merge jejb/andmike changes
parents
e9167d31
6242b376
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
16 deletions
+20
-16
drivers/pci/probe.c
drivers/pci/probe.c
+1
-0
drivers/scsi/hosts.h
drivers/scsi/hosts.h
+7
-8
drivers/scsi/scsi_ioctl.c
drivers/scsi/scsi_ioctl.c
+5
-4
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_scan.c
+3
-2
drivers/scsi/st.c
drivers/scsi/st.c
+3
-2
include/linux/device.h
include/linux/device.h
+1
-0
No files found.
drivers/pci/probe.c
View file @
cc3347ed
...
...
@@ -448,6 +448,7 @@ struct pci_dev * __devinit pci_scan_device(struct pci_dev *temp)
/* now put in global tree */
strcpy
(
dev
->
dev
.
bus_id
,
dev
->
slot_name
);
dev
->
dev
.
dma_mask
=
&
dev
->
dma_mask
;
device_register
(
&
dev
->
dev
);
return
dev
;
...
...
drivers/scsi/hosts.h
View file @
cc3347ed
...
...
@@ -479,12 +479,6 @@ struct Scsi_Host
*/
unsigned
int
max_host_blocked
;
/*
* For SCSI hosts which are PCI devices, set pci_dev so that
* we can do BIOS EDD 3.0 mappings
*/
struct
pci_dev
*
pci_dev
;
/*
* Support for driverfs filesystem
*/
...
...
@@ -522,11 +516,16 @@ static inline void scsi_assign_lock(struct Scsi_Host *shost, spinlock_t *lock)
shost
->
host_lock
=
lock
;
}
static
inline
void
scsi_set_device
(
struct
Scsi_Host
*
shost
,
struct
device
*
dev
)
{
shost
->
host_gendev
=
dev
;
}
static
inline
void
scsi_set_pci_device
(
struct
Scsi_Host
*
shost
,
struct
pci_dev
*
pdev
)
{
shost
->
pci_dev
=
pdev
;
shost
->
host_gendev
=
&
pdev
->
dev
;
scsi_set_device
(
shost
,
&
pdev
->
dev
);
}
...
...
drivers/scsi/scsi_ioctl.c
View file @
cc3347ed
...
...
@@ -393,12 +393,13 @@ int scsi_ioctl_send_command(Scsi_Device * dev, Scsi_Ioctl_Command * sic)
* any copy_to_user() error on failure there
*/
static
int
scsi_ioctl_get_pci
(
Scsi_Device
*
dev
,
void
*
arg
)
scsi_ioctl_get_pci
(
Scsi_Device
*
s
dev
,
void
*
arg
)
{
struct
device
*
dev
=
sdev
->
host
->
host_driverfs_dev
.
parent
;
if
(
!
dev
->
host
->
pci_dev
)
return
-
ENXIO
;
return
copy_to_user
(
arg
,
dev
->
host
->
pci_dev
->
slot_name
,
sizeof
(
dev
->
host
->
pci_dev
->
slot_name
));
if
(
!
dev
)
return
-
ENXIO
;
return
copy_to_user
(
arg
,
dev
->
bus_id
,
sizeof
(
dev
->
bus_id
));
}
...
...
drivers/scsi/scsi_scan.c
View file @
cc3347ed
...
...
@@ -373,11 +373,12 @@ static void scsi_initialize_merge_fn(struct scsi_device *sd)
{
request_queue_t
*
q
=
&
sd
->
request_queue
;
struct
Scsi_Host
*
sh
=
sd
->
host
;
struct
device
*
dev
=
sh
->
host_driverfs_dev
.
parent
;
u64
bounce_limit
;
if
(
sh
->
highmem_io
)
{
if
(
sh
->
pci_dev
&&
PCI_DMA_BUS_IS_PHYS
)
{
bounce_limit
=
sh
->
pci_
dev
->
dma_mask
;
if
(
dev
&&
dev
->
dma_mask
&&
PCI_DMA_BUS_IS_PHYS
)
{
bounce_limit
=
*
dev
->
dma_mask
;
}
else
{
/*
* Platforms with virtual-DMA translation
...
...
drivers/scsi/st.c
View file @
cc3347ed
...
...
@@ -3770,13 +3770,14 @@ static int st_attach(Scsi_Device * SDp)
tpnt
->
try_dio
=
try_direct_io
&&
!
SDp
->
host
->
unchecked_isa_dma
;
bounce_limit
=
BLK_BOUNCE_HIGH
;
/* Borrowed from scsi_merge.c */
if
(
SDp
->
host
->
highmem_io
)
{
struct
device
*
dev
=
SDp
->
host
->
host_driverfs_dev
.
parent
;
if
(
!
PCI_DMA_BUS_IS_PHYS
)
/* Platforms with virtual-DMA translation
* hardware have no practical limit.
*/
bounce_limit
=
BLK_BOUNCE_ANY
;
else
if
(
SDp
->
host
->
pci_dev
)
bounce_limit
=
SDp
->
host
->
pci_
dev
->
dma_mask
;
else
if
(
dev
&&
dev
->
dma_mask
)
bounce_limit
=
*
dev
->
dma_mask
;
}
else
if
(
SDp
->
host
->
unchecked_isa_dma
)
bounce_limit
=
BLK_BOUNCE_ISA
;
bounce_limit
>>=
PAGE_SHIFT
;
...
...
include/linux/device.h
View file @
cc3347ed
...
...
@@ -270,6 +270,7 @@ struct device {
being off. */
unsigned
char
*
saved_state
;
/* saved device state */
u64
*
dma_mask
;
/* dma mask (if dma'able device) */
void
(
*
release
)(
struct
device
*
dev
);
};
...
...
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