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
ad542ef5
Commit
ad542ef5
authored
May 17, 2005
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of
rsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-2.6.git
parents
ff96b3d4
f3ac91cf
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
7 deletions
+19
-7
drivers/scsi/libata-core.c
drivers/scsi/libata-core.c
+7
-5
drivers/scsi/libata-scsi.c
drivers/scsi/libata-scsi.c
+4
-1
drivers/scsi/sata_svw.c
drivers/scsi/sata_svw.c
+1
-1
include/linux/libata.h
include/linux/libata.h
+7
-0
No files found.
drivers/scsi/libata-core.c
View file @
ad542ef5
...
@@ -1253,11 +1253,11 @@ void __sata_phy_reset(struct ata_port *ap)
...
@@ -1253,11 +1253,11 @@ void __sata_phy_reset(struct ata_port *ap)
unsigned
long
timeout
=
jiffies
+
(
HZ
*
5
);
unsigned
long
timeout
=
jiffies
+
(
HZ
*
5
);
if
(
ap
->
flags
&
ATA_FLAG_SATA_RESET
)
{
if
(
ap
->
flags
&
ATA_FLAG_SATA_RESET
)
{
scr_write
(
ap
,
SCR_CONTROL
,
0x301
);
/* issue phy wake/reset */
/* issue phy wake/reset */
scr_
read
(
ap
,
SCR_STATUS
);
/* dummy read; flush */
scr_
write_flush
(
ap
,
SCR_CONTROL
,
0x301
);
udelay
(
400
);
/* FIXME: a guess */
udelay
(
400
);
/* FIXME: a guess */
}
}
scr_write
(
ap
,
SCR_CONTROL
,
0x300
);
/* issue
phy wake/clear reset */
scr_write
_flush
(
ap
,
SCR_CONTROL
,
0x300
);
/*
phy wake/clear reset */
/* wait for phy to become ready, if necessary */
/* wait for phy to become ready, if necessary */
do
{
do
{
...
@@ -2539,7 +2539,7 @@ static void atapi_request_sense(struct ata_port *ap, struct ata_device *dev,
...
@@ -2539,7 +2539,7 @@ static void atapi_request_sense(struct ata_port *ap, struct ata_device *dev,
ata_sg_init_one
(
qc
,
cmd
->
sense_buffer
,
sizeof
(
cmd
->
sense_buffer
));
ata_sg_init_one
(
qc
,
cmd
->
sense_buffer
,
sizeof
(
cmd
->
sense_buffer
));
qc
->
dma_dir
=
DMA_FROM_DEVICE
;
qc
->
dma_dir
=
DMA_FROM_DEVICE
;
memset
(
&
qc
->
cdb
,
0
,
sizeof
(
ap
->
cdb_len
)
);
memset
(
&
qc
->
cdb
,
0
,
ap
->
cdb_len
);
qc
->
cdb
[
0
]
=
REQUEST_SENSE
;
qc
->
cdb
[
0
]
=
REQUEST_SENSE
;
qc
->
cdb
[
4
]
=
SCSI_SENSE_BUFFERSIZE
;
qc
->
cdb
[
4
]
=
SCSI_SENSE_BUFFERSIZE
;
...
@@ -2811,6 +2811,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
...
@@ -2811,6 +2811,7 @@ void ata_qc_complete(struct ata_queued_cmd *qc, u8 drv_stat)
/* call completion callback */
/* call completion callback */
rc
=
qc
->
complete_fn
(
qc
,
drv_stat
);
rc
=
qc
->
complete_fn
(
qc
,
drv_stat
);
qc
->
flags
&=
~
ATA_QCFLAG_ACTIVE
;
/* if callback indicates not to complete command (non-zero),
/* if callback indicates not to complete command (non-zero),
* return immediately
* return immediately
...
@@ -3229,7 +3230,8 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
...
@@ -3229,7 +3230,8 @@ irqreturn_t ata_interrupt (int irq, void *dev_instance, struct pt_regs *regs)
struct
ata_queued_cmd
*
qc
;
struct
ata_queued_cmd
*
qc
;
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
qc
=
ata_qc_from_tag
(
ap
,
ap
->
active_tag
);
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
)))
if
(
qc
&&
(
!
(
qc
->
tf
.
ctl
&
ATA_NIEN
))
&&
(
qc
->
flags
&
ATA_QCFLAG_ACTIVE
))
handled
|=
ata_host_intr
(
ap
,
qc
);
handled
|=
ata_host_intr
(
ap
,
qc
);
}
}
}
}
...
...
drivers/scsi/libata-scsi.c
View file @
ad542ef5
...
@@ -347,7 +347,10 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
...
@@ -347,7 +347,10 @@ int ata_scsi_slave_config(struct scsi_device *sdev)
*/
*/
if
((
dev
->
flags
&
ATA_DFLAG_LBA48
)
&&
if
((
dev
->
flags
&
ATA_DFLAG_LBA48
)
&&
((
dev
->
flags
&
ATA_DFLAG_LOCK_SECTORS
)
==
0
))
{
((
dev
->
flags
&
ATA_DFLAG_LOCK_SECTORS
)
==
0
))
{
sdev
->
host
->
max_sectors
=
2048
;
/*
* do not overwrite sdev->host->max_sectors, since
* other drives on this host may not support LBA48
*/
blk_queue_max_sectors
(
sdev
->
request_queue
,
2048
);
blk_queue_max_sectors
(
sdev
->
request_queue
,
2048
);
}
}
}
}
...
...
drivers/scsi/sata_svw.c
View file @
ad542ef5
...
@@ -395,7 +395,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
...
@@ -395,7 +395,7 @@ static int k2_sata_init_one (struct pci_dev *pdev, const struct pci_device_id *e
/* Clear a magic bit in SCR1 according to Darwin, those help
/* Clear a magic bit in SCR1 according to Darwin, those help
* some funky seagate drives (though so far, those were already
* some funky seagate drives (though so far, those were already
* set by the firmware on the machines I had access to
* set by the firmware on the machines I had access to
)
*/
*/
writel
(
readl
(
mmio_base
+
K2_SATA_SICR1_OFFSET
)
&
~
0x00040000
,
writel
(
readl
(
mmio_base
+
K2_SATA_SICR1_OFFSET
)
&
~
0x00040000
,
mmio_base
+
K2_SATA_SICR1_OFFSET
);
mmio_base
+
K2_SATA_SICR1_OFFSET
);
...
...
include/linux/libata.h
View file @
ad542ef5
...
@@ -584,6 +584,13 @@ static inline void scr_write(struct ata_port *ap, unsigned int reg, u32 val)
...
@@ -584,6 +584,13 @@ static inline void scr_write(struct ata_port *ap, unsigned int reg, u32 val)
ap
->
ops
->
scr_write
(
ap
,
reg
,
val
);
ap
->
ops
->
scr_write
(
ap
,
reg
,
val
);
}
}
static
inline
void
scr_write_flush
(
struct
ata_port
*
ap
,
unsigned
int
reg
,
u32
val
)
{
ap
->
ops
->
scr_write
(
ap
,
reg
,
val
);
(
void
)
ap
->
ops
->
scr_read
(
ap
,
reg
);
}
static
inline
unsigned
int
sata_dev_present
(
struct
ata_port
*
ap
)
static
inline
unsigned
int
sata_dev_present
(
struct
ata_port
*
ap
)
{
{
return
((
scr_read
(
ap
,
SCR_STATUS
)
&
0xf
)
==
0x3
)
?
1
:
0
;
return
((
scr_read
(
ap
,
SCR_STATUS
)
&
0xf
)
==
0x3
)
?
1
:
0
;
...
...
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