Hi folks,
I have seen a file system corruption when I conected a
previously written SATA disk to my PC using a SATA-via-USB
connector. Probably this wasn't supposed to happen, was it?
I had bought a new 500 GB SATA disk to be built into my
PC. To copy the boot partition I attached it to the PC
u
Linus Torvalds schrieb:
On Sun, 9 Dec 2007, Robert Hancock wrote:
The obvious suspect with a filesystem problem would be the disk
controller driver, AHCI here. However, the controller appears to set the
flag to indicate that it supports 64-bit DMA, so it should be fine,
unless it lies of cour
> > AHCI is a pretty well tested driver, but 99%+ of all testers still tend to
> > have less than 4GB of memory. So I do *not* believe that the highmem bits
> > are all that well tested at all.
Lab tested well and we pretty rapidly found the problems with non Intel
AHCI that had 4GB cases.
> d
Hi,
This patch series is a major rework of the ide-cd driver.
The motivations behind it are twofold:
* ide-cd is still in use but because it has been out of luck for maintainers
lately the code become quite hard to debug and maintain - this puts it back
into the shape
* aid efforts of deve
* Fix ACER/AOpen 24X CDROM speed reporting on big-endian machines
by adding missing le16_to_cpu() calls.
While at it:
* Replace ntohs() by be16_to_cpu().
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |8
1 file changed, 4 insertions(+), 4 d
cdi->mask is cleared by ide_cdrom_register() which is called after the quirk.
Fix it by adding new ->no_speed_select flag to struct ide_cd_config_flags
and using it in ide_cdrom_register() to set CDC_SELECT_SPEED flag.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide
Use ide_cd_release() to do the cleanup if ide_cdrom_setup() fails.
It fixes:
- the default drive->dsc_overlap value not being restored
- the default drive->queue's prep_rq_fn not being restored
- struct gendisk 'g' not being freed
- wrong function name being reported on unregister_cdrom() error
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 16
1 file changed, 8 insertions(+), 8 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/driver
Mask 'ireason' variable with 0x3 so the valid interrupt reason value
is passed to cdrom_write_check_ireason() for checking.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/drivers/ide/ide-cd.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@
Unify writing and reading handling in cdrom_pc_intr() using xfer_func_t.
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 47 +--
1 file changed, 1
Mask 'ireason' variable so only the valid interrupt reason bits
will be reported on "drive appears confused" error.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Index: b/drivers/ide/ide-cd.c
Make cdrom_newpc_intr() match cdrom_{read,write}_intr() w.r.t.
handling DMA errors:
* disable DMA before cdrom_decode_status() call
* log the device name and the type of the request (read/write)
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 10 ++
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
Documentation/ide/ChangeLog.ide-cd.1994-2004 | 268 ++
drivers/ide/ide-cd.c | 274 ---
2 files changed, 272 insertions(+), 270 deletions(-)
Index: b/Document
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |4
1 file changed, 4 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -684,10 +68
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |7 ---
1 file changed, 7 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -1201,13
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.h | 32
1 file changed, 32 deletions(-)
Index: b/drivers/ide/ide-cd.h
===
--- a/drivers/ide/ide-cd.h
+++ b/driver
If drive still wants to transfer the data we need to pad the transfer
instead of just finishing the request.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: b/drivers/ide/ide-cd.c
==
ide_cd_probe() zeroes 'info' prior to calling ide_cdrom_setup() so there
is no need to explicitly zero 'info' fields in the latter function.
Ditto for fields of CDROM_STATE_FLAGS(), CDROM_CONFIG_FLAGS() and 'cdi'
(all are embedded in 'info').
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROT
unused fields:
* ->writing
* ->reserved
write-only fields:
* ->playmsf_as_bcd
* ->subchan_as_bcd
* ->test_write
* ->supp_disc_present
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-120 bytes
drivers/ide/ide-cd.c | 18 ++
drivers/ide/ide-cd.h |7 ---
* Remove ->changer_info from struct cdrom_info (it is never allocated).
* Remove unused struct atapi_{mechstat_header,changer_info,slot}.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-11 bytes
drivers/ide/ide-cd.c |1
drivers/ide/ide-cd.h | 55
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-39 bytes
drivers/ide/ide-cd.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+
* Use CDC_* flags directly and remove redundant flags from ->config_flags.
While at it:
* Add KERN_CONT to printk()-s in ide_cdrom_probe_capabilities().
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-294 bytes
drivers/ide/ide-cd.c | 102 --
While at it rename 'info' variable to 'cd' in cdrom_saw_media_change().
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-49 bytes
drivers/ide/ide-cd.c | 44
drivers/ide/ide-cd.h |2 --
2 files changed, 24 insertions(+), 22 delet
* Remove struct atapi_capabilities_page.
* Add ATAPI_CAPABILITIES_PAGE[_PAD]_SIZE define.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 62 +++---
drivers/ide/ide-cd.h | 223 ---
2 files changed
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |3 ---
drivers/ide/ide-cd.h |7 ---
2 files changed, 10 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++
Remove STANDARD_ATAPI define + drive-by coding style fixes.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 43 ++-
drivers/ide/ide-cd.h | 10 --
2 files changed, 10 insertions(+), 43 deletions(-)
Index:
Re-organize handling of quirky devices:
* Add struct cd_list_entry, ide_cd_quirks_list[] and ide_cd_flags() helper.
* Set flags returned by ide_cd_flags() in ide_cdrom_setup().
* Add IDE_CD_FLAG_VERTOS_{300_SSD,600_ESD} and IDE_CD_FLAG_SANYO_3CD flags.
* Move device quirks from ide_cdrom_setup
ide-cd.c already uses sense keys definitions from .
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.h | 17 -
1 file changed, 17 deletions(-)
Index: b/drivers/ide/ide-cd.h
===
-
* Rename ide-cd kernel module to ide-cd_mod in preparation to moving code out
from ide-cd.[c,h]. Add MODULE_ALIAS("ide-cd") to preserve compatibility.
* Move VERBOSE_IDE_CD_ERRORS code from ide-cd.[c,h] to ide-cd_verbose.c.
ide-cd_verbose.c is IDE subsystem independent and may be easily co
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 26 ++
1 file changed, 10 insertions(+), 16 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-19 bytes
drivers/ide/ide-cd.c | 53 ---
1 file changed, 21 insertions(+), 32 deletions(-)
Index: b/drivers/ide/ide-cd.c
Add ide_cd_pad_transfer() helper and use it in cdrom_[new]pc_intr()
and cdrom_{read,write}_check_ireason().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-39 bytes
drivers/ide/ide-cd.c | 51 +
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/Makefile |2
drivers/ide/ide-cd.c | 271 +
drivers/ide/ide-cd.h | 17 ++
drivers/ide/i
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-c
* Bump driver version.
* Remove filename and stale TODO from comments.
* Add my copyrights.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
Index: b/drivers/ide/ide-cd.c
==
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-59 bytes
drivers/ide/ide-cd.c | 50 --
1 file changed, 24 insertions(+), 26 deletions(-)
Index: b/drivers/ide/ide-cd
Add 'rw' parameter to cdrom_read_check_ireason(), make it handle
both read and write checking, rename it to ide_cd_check_ireason(),
finally remove no longer needed cdrom_write_check_ireason().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz
Add handling of fs read/write requests to cdrom_nepwc_intr()
and remove no longer needed cdrom_rw_intr().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-496 bytes
drivers/ide/ide-cd.c | 272 +-
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.
In cdrom_newpc_intr():
* cleanup variables in the 'transfer data' loop
In cdrom_rw_intr():
* rename 'sectors_to_transfer' to 'thislen'
* rename 'this_transfer' to 'blen'
* keep number of bytes (instead of sectors) in 'thislen' and 'blen'
* call 'xferfunc' only once for 'blen'
* cache 'rq->buffer'
Use the fact that for the first loop rq->current_nr_sectors is always
set and unify moving to the next buffer for read/write requests.
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-46 bytes
drivers/ide/ide-cd.c |
Add handling of read requests to cdrom_start_write(), rename it
to cdrom_start_rw() and remove no longer needed cdrom_start_read().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-20 bytes
drivers/ide/ide-cd.c | 1
* Add handling of write requests to cdrom_start_read_continuation(),
rename it to cdrom_start_rw_cont() and remove no longer needed
cdrom_start_write_cont().
* Remove redundant '(rq->sector & (sectors_per_frame - 1)' check.
There should be no functionality changes caused by this patch.
Sign
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.h | 10 --
1 file changed, 10 deletions(-)
Index: b/drivers/ide/ide-cd.h
===
--- a/drivers/ide/ide-cd.h
+++ b/drivers/ide/ide-cd.h
@@ -49,
Add handling of read requests to cdrom_write_intr(), rename it
to cdrom_rw_intr() and remove no longer needed cdrom_read_intr().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-368 bytes
drivers/ide/ide-cd.c | 207
This is a preparation for cdrom_read_intr() and cdrom_write_intr() merge.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
+26 bytes
drivers/ide/ide-cd.c | 38 ++
1 file changed, 26 insertions(+), 12 deletions(-)
Index: b/drivers/ide/ide-cd.
Add ide_cd_drain_data() and use it in cdrom_{buffer_sectors,read_intr}()
(as a nice side-effect this cuts 0.5kB of code from ide-cd.o).
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-511 bytes
drivers/ide/ide-cd.c
Add REQ_TYPE_{SENSE,ATA_PC} requests handling to cdrom_do_block_pc()
and remove cdrom_do_packet_command().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-29 bytes
drivers/ide/ide-cd.c | 25 +-
cdrom_do_pc_continuation() is now identical to cdrom_do_newpc_cont()
so just always use the latter function.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-49 bytes
drivers/ide/ide-cd.c | 15 ++-
1 file changed, 2 insertions(+), 13 deletions(-)
Index: b/drivers/
Add handling of REQ_TYPE_{SENSE,ATA_PC} requests to cdrom_newpc_intr()
(please note that these requests never have 'bio' attached to them
and they never use DMA), then remove no longer needed cdrom_pc_intr().
There should be no functionality changes caused by this patch.
Signed-off-by: Bartlomie
This is a preparation for cdrom_pc_intr() and cdrom_newpc_intr() merge.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
+10 bytes
drivers/ide/ide-cd.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
This is a preparation for cdrom_pc_intr() and cdrom_newpc_intr() merge.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 25 +++--
1 file changed, 15 insertions(+), 10 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
There is no need for it anylonger and ide_set_handler() complains
if ->handler is not NULL anyway.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |2 --
1 file changed, 2 deletions(-)
Index: b/drivers/ide/ide-cd.c
==
* cdrom_prepare_request() -> ide_cd_init_rq()
* cdrom_queue_packet_command() -> ide_cd_queue_pc()
* cdrom_lockdoor() -> ide_cd_lockdoor()
* cdrom_read_toc() -> ide_cd_read_toc()
* cdrom_get_toc_entry() -> ide_cd_get_toc_entry()
This is a preparation to move code handling cdrom.c IOCTLs out of ide
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 23 +++
1 file changed, 11 insertions(+), 12 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++
This is a preparation to move code handling cdrom.c IOCTLs out of ide-cd.c.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: b/drivers/ide/ide-cd.c
==
* Move lba_to_msf() and msf_to_lba() to
(use 'u8' type instead of 'byte' while at it).
* Remove msf_to_lba() copy from drivers/cdrom/cdrom.c.
Cc: Jens Axboe <[EMAIL PROTECTED]>
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/cdrom/cdrom.c |6 --
drivers/ide/i
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-13 bytes
drivers/ide/ide-cd.c | 66 ++-
1 file changed, 29 insertions(+), 37 deletions(-)
Index: b/drivers/ide/ide-cd.c
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 142 ++-
1 file changed, 75 insertions(+), 67 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--
* Coding style fixes for VERBOSE_IDE_CD_ERRORS code.
* Add KERN_{ERR,CONT} printk() levels where needed.
This is a preparation for moving this code out of ide-cd.[c,h].
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 65 +---
Use BCD2BIN()/BIN2BCD() macros from
and remove the local bcd2bin()/bin2bcd() inlines.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
+15 bytes :(
drivers/ide/ide-cd.c | 34 +++---
1 file changed, 11 insertions(+), 23 deletions(-)
Index: b/drivers
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c |5 -
1 file changed, 4 insertions(+), 1 deletion(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd
* Remove unused ->{writing,reserved} fields from struct ide_cd_config_flags.
* Move ->max_speed from struct ide_cd_config_flags to struct cdrom_info.
* Move ->current_speed from struct ide_cd_state_flags to struct cdrom_info.
* Add defines for config and state flags.
* Add 'unsigned int cd_fla
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 13 -
1 file changed, 8 insertions(+), 5 deletions(-)
Index: b/drivers/ide/ide-cd.c
===
--- a/drivers/ide/ide-cd.c
+++ b/drivers/i
While at it rename 'info' variable to 'cd' in
ide_cdrom_probe_capabilities() and ide_cdrom_setup().
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
-47 bytes
drivers/ide/ide-cd.c | 96 ++-
drivers/ide/ide-cd.h |2 -
2 files c
While at it remove stale/incorrect comment.
Signed-off-by: Bartlomiej Zolnierkiewicz <[EMAIL PROTECTED]>
---
drivers/ide/ide-cd.c | 19 +++
1 file changed, 7 insertions(+), 12 deletions(-)
Index: b/drivers/ide/ide-cd.c
==
Hello,
Shane Huang wrote:
>>> Do you guys think it's normal? It not, how to make SATA hotplug work
> on
>>> different SATA port? Should it be supported by BIOS or hardware?
>> If you connect it to a different port, the original device will die
> and
>> new device will appear. That's the expected
68 matches
Mail list logo