Skip to content
Snippets Groups Projects
Commit 8ed21637 authored by (no author)'s avatar (no author)
Browse files

This commit was manufactured by cvs2svn to create tag 'RELEASE_5_20'.

parent d1a405e8
No related branches found
No related tags found
No related merge requests found
Showing
with 0 additions and 2255 deletions
---------------------------------------------------------------------------
# August 14, 2003
#
# Adam Radford has incorporated a change that now allows the 3w-xxxx
# driver to return the Cylinder Low/High values. These are needed to
# get the SMART health status. This patch incorporates those changes
# as well.
#
# August 12, 2003
#
# 3ware has incorporated a more general version of this fix into their latest
# 3w-xxxx driver release. Rather than using this patch, you can upgrade your
# 3w-xxxx driver to version 1.02.00.037 or greater. Or you can use this patch.
#
# August 8, 2003
# PATCH FOR 3WARE 3w-xxxx DRIVER
# Bruce Allen ballen at gravity.phys.uwm.edu
# CVS ID of this file: $Id: 3w-xxxx.txt,v 1.3 2003/08/14 14:56:07 ballen4705 Exp $
#
# To apply this patch, save this entire file to 3w-xxxx.txt in a
# directory containing the original unpatched 3w-xxxx.c file. Then
# given the command:
# patch < 3w-xxxx.txt
# That's it!
#
# TECHNICAL EXPLANATION OF THE PATCH FOLLOWS. SKIP IT IF YOU DON'T CARE.
#
# The 3w-xxxx SCSI RAID driver for 3ware Escalade controller cards has a bug
# in the "passthru" ioctl() which prevents two SMART commands from being
# passed to the ATA devices behind the controller. The commands are:
#
# SMART ENABLE/DISABLE ATTRIBUTE AUTOSAVE
# (Command Register=0xB0/Feature Register=0xD2)
#
# SMART ENABLE/DISABLE AUTOMATIC OFF-LINE
# (Command Register=0xB0/Feature Register=0xDB)
#
# [Note: the second of these commands is listed as "Obsolete" in the ATA
# specifications. It was originally defined in SFF-8035i. Most vendors
# (IBM/Hitachi, Maxtor, Samsung, WD, among others) still implement it for
# backwards compatibility.]
#
# The problem arises because in both cases (stupidly!) the ENABLE subcommand
# is indicated with a nonzero value of the Sector Count Register. For the
# AUTOSAVE command one uses Sector Count Register=0xF1 and for the AUTOMATIC
# OFF-LINE command one uses Sector Count Register=0xF8.
#
# This provokes the following error messages from the 3w-xxxx driver:
# 3w-xxxx: tw_ioctl(): Passthru size (123392) too big.
# 3w-xxxx: tw_ioctl(): Passthru size (126976) too big.
# and the driver doesn't pass the ATA command on. This is because the
# passthru part of the 3w-xxxx driver assumes that the value in the Sector
# Count Register is the number of 512-byte blocks to transfer, and these
# values exceed the internal buffer sizes.
#
# In fact both of these are non-data commands, and so this is trivial to
# fix. I am attaching an 8-line patch for this purpose. It looks for these
# particular commands and then treats them as non-data commands. It has been
# tested on both a 6800 and a 7500 controller, and should be endian-order
# and 32/64-bit clean.
#
# [Note: the normal linux ide drivers also assume that the Sector Count
# Register is the number of 512-byte sectors to transfer to user space.
# But in that case the user can simply allocate a userland buffer large
# enough to hold the 0xf1*0x200 or 0xf8*0x200 bytes, and then ignore the
# contents.]
#
# -----------------------------------------------------------------------
--- 3w-xxxx.c.save Thu Aug 14 16:28:35 2003
+++ 3w-xxxx.c Thu Aug 14 16:44:04 2003
@@ -1915,12 +1915,15 @@
}
passthru = (TW_Passthru *)tw_dev->command_packet_virtual_address[request_id];
- passthru->sg_list[0].length = passthru->sector_count*512;
- if (passthru->sg_list[0].length > TW_MAX_PASSTHRU_BYTES) {
- printk(KERN_WARNING "3w-xxxx: tw_ioctl(): Passthru size (%d) too big.\n", passthru->sg_list[0].length);
- return 1;
+ /* Don't load sg_list for non-data ATA cmds */
+ if ((passthru->param != 0) && (passthru->param != 0x8)) {
+ passthru->sg_list[0].length = passthru->sector_count*512;
+ if (passthru->sg_list[0].length > TW_MAX_PASSTHRU_BYTES) {
+ printk(KERN_WARNING "3w-xxxx: tw_ioctl(): Passthru size (%d) too big.\n", passthru->sg_list[0].length);
+ return 1;
+ }
+ passthru->sg_list[0].address = tw_dev->alignment_physical_address[request_id];
}
- passthru->sg_list[0].address = tw_dev->alignment_physical_address[request_id];
tw_post_command_packet(tw_dev, request_id);
return 0;
case TW_CMD_PACKET:
@@ -2170,8 +2173,15 @@
ioctl = (TW_Ioctl *)buff;
switch (ioctl->opcode) {
case TW_ATA_PASSTHRU:
- passthru = (TW_Passthru *)ioctl->data;
- memcpy(buff, tw_dev->alignment_virtual_address[request_id], passthru->sector_count * 512);
+ passthru = (TW_Passthru *)ioctl->data;
+ /* Don't return data for non-data ATA cmds */
+ if ((passthru->param != 0) && (passthru->param != 0x8))
+ memcpy(buff, tw_dev->alignment_virtual_address[request_id], passthru->sector_count * 512);
+ else {
+ /* For non-data cmds, return cmd pkt */
+ if (tw_dev->srb[request_id]->request_bufflen >= sizeof(TW_Command))
+ memcpy(buff, tw_dev->command_packet_virtual_address[request_id], sizeof(TW_Command));
+ }
break;
case TW_CMD_PACKET_WITH_DATA:
dprintk(KERN_WARNING "3w-xxxx: tw_ioctl_complete(): caught TW_CMD_PACKET_WITH_DATA.\n");
This diff is collapsed.
# Manufactures HTML file from XML file. Note: do NOT edit the HTML
# file, only the XML file.
all: smartmontools_scsi.html
smartmontools_scsi.html: smartmontools_scsi.xml
xmlto html-nochunks smartmontools_scsi.xml
upload: smartmontools_scsi.html index.html
scp smartmontools_scsi.html ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs
scp 3w-xxxx.txt ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs
scp index.html ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs
scp examples/*.html ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs/examples
scp examples/*.txt ballen4705@smartmontools.sourceforge.net:/home/groups/s/sm/smartmontools/htdocs/examples
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1.0.7 (GNU/Linux)
mQGiBD9XAXIRBACgLEphBmhUKWE1mRKzjkq/8vZHtJsVUiFivcbxaSLa9jBbJoZV
sQk5fdcleVE6CcuodMetVE6Gl8uM4W4iymp0i35lwefdgmUzJYmza1ZD7Uk0x4zv
tKi9xZ9Hc+yrf4SHRwLTZxuUyLf9TURwGXfLd2bxP1USYJVL4vOYoiBwBwCgq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Tc0AL3MfCbK4mlssVhS0SAq35E/osCLQcor7Sx
sohPBBgRAgAPBQI/VwF4AhsMBQkCeNAAAAoJECM+HzqbsZoi4WUAn2IQhEtHY/48
4rljbro8yUwYlrXzAJ44VfTwmjLlI9aoYdRW/cTtZ0tPgw==
=f2kQ
-----END PGP PUBLIC KEY BLOCK-----
#!/bin/bash
# execute this script in the current shell, using for example
# . cvs_script
unset CVS_SERVER
export CVS_RSH=ssh
export CVSROOT=:ext:ballen4705@cvs.smartmontools.sourceforge.net:/cvsroot/smartmontools
[root/]# smartctl -v 9,seconds -v 200,writeerrorcount /dev/hda
smartctl version 5.1-18 Copyright (C) 2002-3 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Device Model: FUJITSU MHR2040AT
Serial Number: NJ41T291391J
Firmware Version: 40BA
Device is: Not in smartctl database [for details use: -P showall]
ATA Version is: 6
ATA Standard is: ATA/ATAPI-6 T13 1410D revision 1
Local Time is: Thu Sep 4 22:18:48 2003 CEST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled
=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: FAILED!
Drive failure expected in less than 24 hours. SAVE ALL DATA.
See vendor-specific Attribute list for failed Attributes.
General SMART Values:
Off-line data collection status: (0x00) Offline data collection activity was
never started.
Auto Off-line Data Collection: Disabled.
Self-test execution status: ( 0) The previous self-test routine completed
without error or no self-test has ever
been run.
Total time to complete off-line
data collection: ( 468) seconds.
Offline data collection
capabilities: (0x1b) SMART execute Offline immediate.
Automatic timer ON/OFF support.
Suspend Offline collection upon new
command.
Offline surface scan supported.
Self-test supported.
No Conveyance Self-test supported.
No Selective Self-test supported.
SMART capabilities: (0x0003) Saves SMART data before entering
power-saving mode.
Supports SMART auto save timer.
Error logging capability: (0x01) Error logging supported.
No General Purpose Logging support.
Short self-test routine
recommended polling time: ( 2) minutes.
Extended self-test routine
recommended polling time: ( 60) minutes.
SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME FLAG VALUE WORST THRESH TYPE UPDATED WHEN_FAILED RAW_VALUE
1 Raw_Read_Error_Rate 0x000f 100 100 046 Pre-fail Always - 52685626284
2 Throughput_Performance 0x0005 100 100 020 Pre-fail Offline - 0
3 Spin_Up_Time 0x0003 093 093 025 Pre-fail Always - 24065
4 Start_Stop_Count 0x0032 100 100 000 Old_age Always - 160
5 Reallocated_Sector_Ct 0x0033 099 099 024 Pre-fail Always - 31
7 Seek_Error_Rate 0x000f 100 100 047 Pre-fail Always - 131071
8 Seek_Time_Performance 0x0005 100 100 019 Pre-fail Offline - 0
9 Power_On_Seconds 0x0032 092 092 000 Old_age Always - 1335h+10m+34s
10 Spin_Retry_Count 0x0013 100 100 020 Pre-fail Always - 0
12 Power_Cycle_Count 0x0032 100 100 000 Old_age Always - 150
192 Power-Off_Retract_Count 0x0032 099 099 000 Old_age Always - 7
193 Load_Cycle_Count 0x0032 074 074 000 Old_age Always - 95890
194 Temperature_Celsius 0x0022 090 100 000 Old_age Always - 57
195 Hardware_ECC_Recovered 0x001a 100 100 000 Old_age Always - 10141348
196 Reallocated_Event_Count 0x0032 099 099 000 Old_age Always - 30
197 Current_Pending_Sector 0x0012 100 100 000 Old_age Always - 0
198 Offline_Uncorrectable 0x0010 100 100 000 Old_age Offline - 0
199 UDMA_CRC_Error_Count 0x003e 200 200 000 Old_age Always - 0
200 Write_Error_Count 0x000f 036 033 060 Pre-fail Always FAILING_NOW 2883583
203 Run_Out_Cancel 0x0002 091 091 000 Old_age Always - 2589872160305
SMART Error Log Version: 1
No Errors Logged
SMART Self-test log structure revision number 1
No self-tests have been logged
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment