summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/usb/storage/sddr09.c12
-rw-r--r--fs/jfs/jfs_logmgr.c34
-rw-r--r--fs/jfs/jfs_txnmgr.c26
3 files changed, 39 insertions, 33 deletions
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index 660b090248bc..398814aef5a4 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -65,6 +65,7 @@ struct nand_flash_dev {
* NAND Flash Manufacturer ID Codes
*/
#define NAND_MFR_AMD 0x01
+#define NAND_MFR_NS 0x8f
#define NAND_MFR_TOSHIBA 0x98
#define NAND_MFR_SAMSUNG 0xec
@@ -72,6 +73,8 @@ static inline char *nand_flash_manufacturer(int manuf_id) {
switch(manuf_id) {
case NAND_MFR_AMD:
return "AMD";
+ case NAND_MFR_NS:
+ return "NS";
case NAND_MFR_TOSHIBA:
return "Toshiba";
case NAND_MFR_SAMSUNG:
@@ -84,10 +87,12 @@ static inline char *nand_flash_manufacturer(int manuf_id) {
/*
* It looks like it is unnecessary to attach manufacturer to the
* remaining data: SSFDC prescribes manufacturer-independent id codes.
+ *
+ * 256 MB NAND flash has a 5-byte ID with 2nd byte 0xaa, 0xba, 0xca or 0xda.
*/
static struct nand_flash_dev nand_flash_ids[] = {
- /* NAND flash - these I verified */
+ /* NAND flash */
{ 0x6e, 20, 8, 4, 8, 2}, /* 1 MB */
{ 0xe8, 20, 8, 4, 8, 2}, /* 1 MB */
{ 0xec, 20, 8, 4, 8, 2}, /* 1 MB */
@@ -101,12 +106,13 @@ static struct nand_flash_dev nand_flash_ids[] = {
{ 0x75, 25, 9, 5, 10, 2}, /* 32 MB */
{ 0x76, 26, 9, 5, 10, 3}, /* 64 MB */
{ 0x79, 27, 9, 5, 10, 3}, /* 128 MB */
- /* There do also exist 96 MB (from Datafab) and 256 MB cards */
- /* MASK ROM - from unknown source */
+ /* MASK ROM */
{ 0x5d, 21, 9, 4, 8, 2}, /* 2 MB */
{ 0xd5, 22, 9, 4, 9, 2}, /* 4 MB */
{ 0xd6, 23, 9, 4, 10, 2}, /* 8 MB */
+ { 0x57, 24, 9, 4, 11, 2}, /* 16 MB */
+ { 0x58, 25, 9, 4, 12, 2}, /* 32 MB */
{ 0,}
};
diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c
index fc218ce7c597..2d18d1d64875 100644
--- a/fs/jfs/jfs_logmgr.c
+++ b/fs/jfs/jfs_logmgr.c
@@ -674,28 +674,29 @@ int lmGroupCommit(struct jfs_log * log, struct tblock * tblk)
}
jfs_info("lmGroup Commit: tblk = 0x%p, gcrtc = %d", tblk, log->gcrtc);
- if (tblk->xflag & COMMIT_LAZY) {
- /*
- * Lazy transactions can leave now
- */
+ if (tblk->xflag & COMMIT_LAZY)
tblk->flag |= tblkGC_LAZY;
- LOGGC_UNLOCK(log);
- return 0;
- }
- /*
- * group commit pageout in progress
- */
- if ((!(log->cflag & logGC_PAGEOUT)) && log->cqueue.head) {
+
+ if ((!(log->cflag & logGC_PAGEOUT)) && log->cqueue.head &&
+ (!(tblk->xflag & COMMIT_LAZY) || test_bit(log_FLUSH, &log->flag))) {
/*
- * only transaction in the commit queue:
+ * No pageout in progress
*
- * start one-transaction group commit as
- * its group leader.
+ * start group commit as its group leader.
*/
log->cflag |= logGC_PAGEOUT;
lmGCwrite(log, 0);
}
+
+ if (tblk->xflag & COMMIT_LAZY) {
+ /*
+ * Lazy transactions can leave now
+ */
+ LOGGC_UNLOCK(log);
+ return 0;
+ }
+
/* lmGCwrite gives up LOGGC_LOCK, check again */
if (tblk->flag & tblkGC_COMMITTED) {
@@ -894,11 +895,8 @@ void lmPostGC(struct lbuf * bp)
* the first transaction entering group commit
* will elect herself as new group leader.
*/
- else {
+ else
log->cflag &= ~logGC_PAGEOUT;
- clear_bit(log_FLUSH, &log->flag);
- WARN_ON(log->flush_tblk);
- }
//LOGGC_UNLOCK(log);
spin_unlock_irqrestore(&log->gclock, flags);
diff --git a/fs/jfs/jfs_txnmgr.c b/fs/jfs/jfs_txnmgr.c
index 13226284c648..e07b27276998 100644
--- a/fs/jfs/jfs_txnmgr.c
+++ b/fs/jfs/jfs_txnmgr.c
@@ -518,22 +518,24 @@ void txEnd(tid_t tid)
/*
* mark the tblock not active
*/
- --log->active;
+ if (--log->active == 0) {
+ clear_bit(log_FLUSH, &log->flag);
- /*
- * synchronize with logsync barrier
- */
- if (test_bit(log_SYNCBARRIER, &log->flag) && log->active == 0) {
- /* forward log syncpt */
- /* lmSync(log); */
+ /*
+ * synchronize with logsync barrier
+ */
+ if (test_bit(log_SYNCBARRIER, &log->flag)) {
+ /* forward log syncpt */
+ /* lmSync(log); */
- jfs_info(" log barrier off: 0x%x", log->lsn);
+ jfs_info("log barrier off: 0x%x", log->lsn);
- /* enable new transactions start */
- clear_bit(log_SYNCBARRIER, &log->flag);
+ /* enable new transactions start */
+ clear_bit(log_SYNCBARRIER, &log->flag);
- /* wakeup all waitors for logsync barrier */
- TXN_WAKEUP(&log->syncwait);
+ /* wakeup all waitors for logsync barrier */
+ TXN_WAKEUP(&log->syncwait);
+ }
}
/*