Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 214741 Details for
Bug 316991
libata: doesn't support wildcard matching in ata_blacklist_entry
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Fix based upon upstream
linux-2.6.9-60.EL-libata-wildcard.patch (text/plain), 2.30 KB, created by
David Milburn
on 2007-10-03 15:14:42 UTC
(
hide
)
Description:
Fix based upon upstream
Filename:
MIME Type:
Creator:
David Milburn
Created:
2007-10-03 15:14:42 UTC
Size:
2.30 KB
patch
obsolete
>--- linux-2.6.9/drivers/ata/libata-core.c.wildcard >+++ linux-2.6.9/drivers/ata/libata-core.c >@@ -3348,15 +3348,10 @@ static const struct ata_blacklist_entry > /* http://thread.gmane.org/gmane.linux.ide/14907 */ > { "FUJITSU MHT2060BH", NULL, ATA_HORKAGE_NONCQ }, > /* NCQ is broken */ >- { "Maxtor 6L250S0", "BANC1G10", ATA_HORKAGE_NONCQ }, >- { "Maxtor 6B200M0", "BANC1BM0", ATA_HORKAGE_NONCQ }, >- { "Maxtor 6B200M0", "BANC1B10", ATA_HORKAGE_NONCQ }, >- { "HITACHI HDS7250SASUN500G 0621KTAWSD", "K2AOAJ0AHITACHI", >- ATA_HORKAGE_NONCQ }, >- { "HITACHI HDS7250SASUN500G 0607K2BMDD", "K2AOA20AHITACHI", >- ATA_HORKAGE_NONCQ }, >- /* NCQ hard hangs device under heavier load, needs hard power cycle */ >- { "Maxtor 6B250S0", "BANC1B70", ATA_HORKAGE_NONCQ }, >+ { "Maxtor *", "BANC*", ATA_HORKAGE_NONCQ }, >+ { "HITACHI HDS7250SASUN500G*", NULL, ATA_HORKAGE_NONCQ }, >+ { "HITACHI HDS7225SBSUN250G*", NULL, ATA_HORKAGE_NONCQ }, >+ > /* Blacklist entries taken from Silicon Image 3124/3132 > Windows driver .inf file - also several Linux problem reports */ > { "HTS541060G9SA00", "MB3OC60D", ATA_HORKAGE_NONCQ, }, >@@ -3387,25 +3382,39 @@ static int ata_strim(char *s, size_t len > return len; > } > >+int strn_pattern_cmp(const char *patt, const char *name, int wildchar) >+{ >+ const char *p; >+ int len; >+ >+ /* >+ * check for trailing wildcard: *\0 >+ */ >+ p = strchr(patt, wildchar); >+ if (p && ((*(p + 1)) == 0)) >+ len = p - patt; >+ else >+ len = strlen(name); >+ >+ return strncmp(patt, name, len); >+} >+ > unsigned long ata_device_blacklisted(const struct ata_device *dev) > { > unsigned char model_num[40]; > unsigned char model_rev[16]; >- unsigned int nlen, rlen; > const struct ata_blacklist_entry *ad = ata_device_blacklist; > > ata_id_string(dev->id, model_num, ATA_ID_PROD_OFS, > sizeof(model_num)); > ata_id_string(dev->id, model_rev, ATA_ID_FW_REV_OFS, > sizeof(model_rev)); >- nlen = ata_strim(model_num, sizeof(model_num)); >- rlen = ata_strim(model_rev, sizeof(model_rev)); > > while (ad->model_num) { >- if (!strncmp(ad->model_num, model_num, nlen)) { >+ if (!strn_pattern_cmp(ad->model_num, model_num, '*')) { > if (ad->model_rev == NULL) > return ad->horkage; >- if (!strncmp(ad->model_rev, model_rev, rlen)) >+ if (!strn_pattern_cmp(ad->model_rev, model_rev, '*')) > return ad->horkage; > } > ad++;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 316991
: 214741 |
229351